home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 5 / Gold Medal Software - Volume 5 (Gold Medal) (1995).iso / utils1 / cfg241.arj / CFG.DOC < prev    next >
Text File  |  1994-12-28  |  169KB  |  4,470 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                            CFG Version 2.41
  12.  
  13.  
  14.                        Special Enhancements (TM)
  15.  
  16.  
  17.  
  18.                             Mark Treadwell
  19.                         4 Mumford Avenue Apt A
  20.                    Newport, Rhode Island 02840-1719
  21.  
  22.                         CompuServe: 73700,3344
  23.                            Prodigy:  WNBH41A
  24.                   Internet: 73700.3344@compuserve.com
  25.  
  26.  
  27.                   Copyright 1992-1994 Mark Treadwell
  28.                           All Rights Reserved
  29.                                Contents
  30.  
  31.  
  32. Chapter 1:   Introduction  . . . . . . . . . . . . . . . . . . . .   3
  33.       1.1  Basic Operation . . . . . . . . . . . . . . . . . . . .   3
  34.       1.2  System Requirements . . . . . . . . . . . . . . . . . .   3
  35.       1.3  Disk Files Included with CFG  . . . . . . . . . . . . .   3
  36.       1.4  Documentation . . . . . . . . . . . . . . . . . . . . .   4
  37.       1.5  Acknowledgements  . . . . . . . . . . . . . . . . . . .   4
  38.  
  39. Chapter 2:  Registration - Why and How . . . . . . . . . . . . . .   5
  40.       2.1  Definition of Shareware . . . . . . . . . . . . . . . .   5
  41.       2.2  Disclaimer - Agreement  . . . . . . . . . . . . . . . .   5
  42.       2.3  What You Get  . . . . . . . . . . . . . . . . . . . . .   6
  43.       2.4  How To Register . . . . . . . . . . . . . . . . . . . .   6
  44.  
  45. Chapter 3:  Installation . . . . . . . . . . . . . . . . . . . . .   7
  46.       3.1  Procedure . . . . . . . . . . . . . . . . . . . . . . .   7
  47.       3.2  Locations . . . . . . . . . . . . . . . . . . . . . . .   7
  48.       3.3  Quick Help  . . . . . . . . . . . . . . . . . . . . . .   7
  49.  
  50. Chapter 4:  To Use . . . . . . . . . . . . . . . . . . . . . . . .   8
  51.       4.1  Command Line Syntax . . . . . . . . . . . . . . . . . .   8
  52.       4.2  Global Switches . . . . . . . . . . . . . . . . . . . .   8
  53.       4.3  Switch Usage  . . . . . . . . . . . . . . . . . . . . .   9
  54.       4.4  MultiCommand Mode . . . . . . . . . . . . . . . . . . .   9
  55.       4.5  Number Base . . . . . . . . . . . . . . . . . . . . . .  10
  56.       4.6  Return ErrorLevel . . . . . . . . . . . . . . . . . . .  10
  57.       4.7  Messages  . . . . . . . . . . . . . . . . . . . . . . .  10
  58.       4.8  Notes . . . . . . . . . . . . . . . . . . . . . . . . .  10
  59.             4.8.1  Usage From CONFIG.SYS and the Command Line  . .  11
  60.             4.8.2  On Loading High . . . . . . . . . . . . . . . .  11
  61.             4.8.3  Case on the Command Line  . . . . . . . . . . .  11
  62.             4.8.4  DOS Environment . . . . . . . . . . . . . . . .  11
  63.             4.8.5  Undocumented DOS  . . . . . . . . . . . . . . .  13
  64.  
  65. Chapter 5:  Commands . . . . . . . . . . . . . . . . . . . . . . .  14
  66.  
  67. Appendix A:  Problems and Solutions  . . . . . . . . . . . . . . .  63
  68.  
  69. Appendix B:  Bibliography  . . . . . . . . . . . . . . . . . . . .  64
  70.  
  71. Appendix C:  Revision History  . . . . . . . . . . . . . . . . . .  65
  72.  
  73. Appendix D:  Background Discussion . . . . . . . . . . . . . . . .  71
  74.  
  75. Appendix E:  Error Messages  . . . . . . . . . . . . . . . . . . .  73
  76.  
  77. Appendix F:  Sample CONFIG.SYS File  . . . . . . . . . . . . . . .  76
  78.  
  79. Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  77
  80.                        Chapter 1:   Introduction
  81.  
  82.  
  83. Thank you for using CFG Version 2.41.  CFG is a program that provides
  84. multiple utilities for use during CONFIG.SYS device driver
  85. installation and from the DOS command line and batch files.  The
  86. program does not remain resident and releases all memory on
  87. termination.  Suggestions for additions or modifications to CFG are
  88. welcome.
  89.  
  90. I can be contacted via CompuServe Mail at 73700,3344.  CompuServe Mail
  91. may be accessed via the Internet using the address:
  92.  
  93.                        73700.3344@compuserve.com
  94.  
  95. I can be reached via Prodigy Mail at UserID WNBH41A.
  96.  
  97. I may also be contacted via surface mail at the address shown on the
  98. title page.
  99.  
  100. I am an officer in the United States Navy.  As such, I travel
  101. frequently as a part of my job.  I carry my portable computer and
  102. access CompuServe when possible, so your inquiries can be answered
  103. quickly.  I currently have a job ashore and am readily accessible.  I
  104. should not be deployed overseas again until 1996 at the earliest.
  105.  
  106.  
  107. 1.1  Basic Operation__________________________________________________
  108.  
  109. CFG functions similar to many of the standard utilities included with
  110. DOS.  CFG depends on its command line being formatted in accordance
  111. with the Syntax section below and any additional information given for
  112. each command.  CFG processes the command line from left to right and
  113. each command is executed in order.  Many commands return a DOS
  114. ErrorLevel that can be used in a batch file.  The Commands section
  115. below provides detailed information on each command and its options.
  116.  
  117.  
  118. 1.2  System Requirements______________________________________________
  119.  
  120. CFG requires an IBM compatible computer with approximately 160
  121. kilobytes of free low memory to run.  Most commands require DOS
  122. Version 3.0 or later.  If a command requires a later version of DOS,
  123. it is specifically noted in its description in the Commands section
  124. below.  The CFG screen browser will work with all standard video
  125. display systems:  MDA, CGA, EGA, VGA and SVGA.
  126.  
  127.  
  128. 1.3  Disk Files Included with CFG_____________________________________
  129.  
  130.       CFG.COM     - Main executable file
  131.       CFG.HLP     - Short description help file
  132.       CFG.DOC     - Main documentation and long description help file
  133.       CFG.REG     - Shareware registration order form
  134.       CFG.NEW     - Info on changes/bug fixes since the last version
  135.       INSTALL.BAT - Installation batch file for CFG
  136.       CFG.INS     - INSTALL.BAT renamed in the installation directory
  137.       README.CFG  - CFG readme file
  138.       FILE_ID.DIZ - Program ID file
  139.  
  140.  
  141. 1.4  Documentation____________________________________________________
  142.  
  143. This documentation is formatted for printing as a booklet with a
  144. maximum of 65 lines per page.  The Table of Contents and Index are
  145. based on this length.
  146.  
  147.  
  148. 1.5  Acknowledgements_________________________________________________
  149.  
  150. CFG is written entirely in assembly language and compiled using the
  151. Microsoft Macro Assembler Version 6.11a.  There are no external code
  152. libraries involved.
  153.  
  154. CFG was inspired by Michael Mefford's BatchMan utility.  BatchMan only
  155. works from batch files.  Unfortunately, that is not quite what I
  156. wanted...
  157.  
  158. My thanks to:
  159.  
  160. Ed Ruth for testing, suggestions and endurance Beyond the Call of Duty
  161. Rod Pullman for his DEVICE.COM utility
  162. Sande Nissen for her suggestions
  163. ... and the many others whose comments have helped make CFG a better
  164. program
  165.                 Chapter 2:  Registration - Why and How
  166.  
  167.  
  168. 2.1  Definition of Shareware__________________________________________
  169.  
  170. Shareware distribution gives users a chance to try software before
  171. buying it.  If you try a Shareware program and continue using it, you
  172. are expected to register.  Individual programs differ on details --
  173. some request registration while others require it, some specify a
  174. maximum trial period.  With registration, you get anything from the
  175. simple right to continue using the software to an updated program with
  176. printed manual.
  177.  
  178. Copyright laws apply to both Shareware and commercial software, and
  179. the  copyright holder retains all rights, with a few specific
  180. exceptions as stated below.  Shareware authors are accomplished
  181. programmers, just like commercial authors, and the programs are of
  182. comparable quality.  The main difference is in the method of
  183. distribution.  The author specifically grants the right to copy and
  184. distribute the software, either to all and sundry, or to a specific
  185. group.  For example, some authors require written permission before a
  186. commercial disk vendor may copy their Shareware.
  187.  
  188. Shareware is a distribution method, not a type of software.  You
  189. should find software that suits your needs and pocketbook, whether
  190. it's commercial or Shareware.  The Shareware system makes fitting your
  191. needs easier, because you can try before you buy.  And because the
  192. overhead is low, prices are low also.  Shareware has the ultimate
  193. money-back guarantee -- if you do not use the product, you do not pay
  194. for it.
  195.  
  196.  
  197. 2.2  Disclaimer - Agreement___________________________________________
  198.  
  199. Users of CFG must accept this disclaimer of warranty: "CFG is supplied
  200. as is.  The author disclaims all warranties, expressed or implied,
  201. including, without limitation, the warranties of merchantability and
  202. of fitness for any purpose.  The author assumes no liability for
  203. damages, direct or consequential, which may result from the use of
  204. CFG."
  205.  
  206. CFG is a "shareware program" and is provided at no charge to the user
  207. for evaluation.  Feel free to share it with your friends, but please
  208. do not give it away altered or as part of another system.  The essence
  209. of "user-supported" software is to provide personal computer users
  210. with quality software without high prices, and yet to provide
  211. incentive for programmers to continue to develop new products.  If you
  212. find this program useful and find that you are using CFG and continue
  213. to use CFG after a reasonable trial period, you must make a
  214. registration payment of $25 to Special Enhancements.  The $25
  215. registration fee will license one copy for use on any one computer at
  216. any one time.  There is a $5 shipping and handling fee for orders
  217. outside the United States.  You must treat this software just like a
  218. book.  An example is that this software may be used by any number of
  219. people and may be freely moved from one computer location to another,
  220. so long as there is no possibility of it being used at one location
  221. while it's being used at another.  Just as a book cannot be read by
  222. two different persons at the same time.
  223.  
  224. Commercial users of CFG must register and pay for their copies of CFG
  225. within 30 days of first use or their license is withdrawn. 
  226. Site-License arrangements may be made by contacting Special
  227. Enhancements.
  228. Anyone distributing CFG for any kind of remuneration must first
  229. contact Special Enhancements at the address below for authorization. 
  230. This authorization will be automatically granted to distributors
  231. recognized by the Association of Shareware Professionals (ASP) as
  232. adhering to its guidelines for shareware distributors, and such
  233. distributors may begin offering CFG immediately.  (However Special
  234. Enhancements must still be advised so that the distributor can be kept
  235. up-to-date with the latest version of CFG.)
  236.  
  237. You are encouraged to pass a copy of CFG along to your friends for
  238. evaluation.  Please encourage them to register their copy if they find
  239. that they can use it.  All registered users receive a copy of the
  240. latest version of CFG.
  241.  
  242.  
  243. 2.3  What You Get_____________________________________________________
  244.  
  245. The registration fee is paid once and gives you the right to use all
  246. future versions.  You get a disk and laser-printed user guide, and are
  247. notified whenever a major revision is released.  Upgrades are free for
  248. the download, but I will ship a new disk and printed documentation for
  249. $10 at your request.  There is a $5 shipping and handling fee for
  250. orders outside the United States.  Just send a message via CompuServe
  251. Mail, and I will ship the order and invoice.
  252.  
  253.  
  254. 2.4  How To Register__________________________________________________
  255.  
  256. There are two ways to register CFG.  The file CFG.REG is an order
  257. form.  Please print and send the form with payment to:
  258.  
  259.                             Mark Treadwell
  260.                         4 Mumford Avenue, Apt A
  261.                         Newport, RI  02840-1719
  262.  
  263. Another way to register is via CompuServe's online SWREG service. 
  264. SWREG is a CompuServe service that easily allows you to register
  265. Shareware.  The price of the program is charged to your CompuServe
  266. account.  To register CFG through SWREG:
  267.  
  268.    *  Run your communications program to logon to CompuServe
  269.       interactively.
  270.  
  271.    *  Type "GO SWREG" [Enter] to get the SWREG menu and follow the
  272.       menus to register CFG.  When prompted for the program
  273.       identification, type 3508, which is CFG's identification number. 
  274.       You'll receive the CFG package in a few days.  The program will
  275.       be on a double-sided, 3.5 inch diskette.  If you prefer a 5.25
  276.       inch diskette, just send me a note via CompuServe Mail
  277.       [73700,3344].
  278.  
  279. If you have any enhancements, problems, suggestions, comments or
  280. complaints, please send them to me via CompuServe Mail or a written
  281. letter to the above address.  Even if you have not decided to keep
  282. CFG, feel free to get in touch with me.  I will reply within 48 hours. 
  283. Send to Mark Treadwell 73700,3344.
  284.                        Chapter 3:  Installation
  285.  
  286.  
  287. 3.1  Procedure________________________________________________________
  288.  
  289. Installation is very easy.  Extract the files from the compressed
  290. archive into the desired disk subdirectory.  Alternately, extract them
  291. onto a floppy disk and run the included INSTALL.BAT file.  The
  292. necessary files will be copied to the drive and directory you specify. 
  293. I recommend installing to your DOS directory or a general utility
  294. directory that is specified in your DOS PATH statement.
  295.  
  296.  
  297. 3.2  Locations________________________________________________________
  298.  
  299. The absolute minimum files for full operation are CFG.COM, CFG.HLP and
  300. CFG.DOC.  CFG.COM expects to find CFG.HLP and CFG.DOC in the same
  301. directory that it was executed from.  If you do not execute a help
  302. command, only CFG.COM itself is required.  If the installation
  303. directory is specified in your DOS PATH, you are not required to
  304. specify the full drive and directory when executing CFG.
  305.  
  306.  
  307. 3.3  Quick Help_______________________________________________________
  308.  
  309. "CFG /?" gets you a syntax description and a summary of commands in a
  310. scrollable window.  "CFG Help CommandName" gets you this file opened
  311. to the appropriate CommandName entry in a scrollable window.
  312.                           Chapter 4:  To Use
  313.  
  314.  
  315. 4.1  Command Line Syntax______________________________________________
  316.  
  317. From CONFIG.SYS:
  318.  
  319.    DEVICE=[d:][path]Cfg.Com CommandName [Options] [;CommandName
  320.       [Options] [; ... ]]
  321.  
  322. From the DOS command line or batch file:
  323.  
  324.    [d:][path]Cfg CommandName [Options] [;CommandName [Options]
  325.       [; ... ]]
  326.  
  327.  
  328. Parameters:
  329.  
  330.  [d:][path]
  331.       Specifies the location of the CFG.COM file.
  332.  
  333.  CommandName
  334.       The valid CommandNames are given below.  The CommandNames must
  335.       be fully spelled out exactly as shown.
  336.  
  337.  [Options]
  338.       CommandName related options and SubCommandNames are detailed
  339.       below for each command.
  340.  
  341.  
  342. 4.2  Global Switches__________________________________________________
  343.  
  344.  /Bn        Base switch.  You may select the desired number system
  345.             base to use.  Some commands specifically require decimal
  346.             or hexadecimal input.  The default number system is base
  347.             10.  The "n" specifies the decimal number representing the
  348.             new number base.  Valid values for "n" are 2, 8, 10 and
  349.             16.  (Example: /B16)
  350.  
  351.  /Dn        Divisor switch.  You may select an optional block size for
  352.             ErrorLevel reporting of commands.  The default block size
  353.             is 1 unless a different default is given in the specific
  354.             command section.  This allows returning a valid ErrorLevel
  355.             for a value that is greater than 255.  The "n" specifies
  356.             the decimal number by which the result is divided.  Valid
  357.             values for "n" range from 1 to 65535.  (Example: /D8192)
  358.  
  359.  /E[+]      Display the exit ErrorLevel.  The "+" option will display
  360.    [@]      extended ErrorLevel information including the command and
  361.    [!]      subcommand being executed.  The "@" option places the
  362.    [E]      output ErrorLevel in the environment variable "EL".  By
  363.             default, this will be in the master environment.  Use the
  364.             /2 switch to place it in the environment of a secondary
  365.             command processor.  Use the "!" option to specify which of
  366.             the possible ErrorLevels to return in MultiCommand.  Use
  367.             the "E" option with "@" if you want the basic ErrorLevel
  368.             displayed with environment output.  The order of the
  369.             options does not matter.
  370.  
  371.  /Q         Quiet switch.  Commands will not display character output
  372.             if this is used.  This switch may be used with the /@EnVar
  373.             switch, but has no effect on the /E and /E+ switch output
  374.             or error output.
  375.  /1[A|B]    Use the primary or master environment.  This is the
  376.             default and overrides the /2 switch.  See the CFG.ADD file
  377.             for an explanation of the "A" and "B" options for this
  378.             switch.
  379.  
  380.  /2         Use the secondary or parent environment.
  381.  
  382.  /@[=]EnVar Environment output switch.  Place ASCII result in the DOS
  383.             environment variable "EnVar".  No spaces are allowed
  384.             between the "@", the "=" (if used) and the environment
  385.             variable name.  The rules for environment variables are
  386.             the same as for the DOS SET command except that mixed case
  387.             is permitted for the variable name by default.  The "="
  388.             option forces CFG to capitalize "EnVar" to ensure
  389.             compatibility with the DOS SET command.  See the DOS
  390.             Environment section in the CFG.ADD file for further
  391.             details.  Each command that supports this switch is
  392.             indicated below.  The variable name should be followed by
  393.             at least one space to prevent following command line text
  394.             from being included in the name.
  395.  
  396.  /,         Insert commas every three places in decimal numbers
  397.             displayed on the screen.
  398.  
  399.  /?         Display an abbreviated command summary.  Available from
  400.             command line only.  Not available in MultiCommand mode.
  401.  
  402. See the individual commands for additional switches.
  403.  
  404.  
  405. 4.3  Switch Usage_____________________________________________________
  406.  
  407. The command line is scanned for any switches before CommandName
  408. parsing.  If a valid switch is found, a program variable is set and
  409. the switch is blanked from the command line by replacing it with
  410. spaces.  This includes text and numbers appearing after the /@, /B, /D
  411. and /E switches.  A switch may be placed anywhere on the command line
  412. and still be found.  Switches will not be found in *quoted* text
  413. strings (such as in Cecho, Echo and EchoPause) as long as there are
  414. closing quotes.  Note that *all* possible switches are scanned for
  415. each command since CFG does not know the CommandName when switch
  416. parsing occurs.
  417.  
  418. If you use the MultiCommand syntax, the switches are scanned only
  419. between the MultiCommand separators.  This allows each individual
  420. command on the command line to have its own different set of switches.
  421.  
  422. If the /1 and /2 switches are both used, CFG will update both the
  423. master and parent environments.  If the two refer to the same segment,
  424. CFG will only update it once.  If both are used with an Env command
  425. information subcommand, master environment data is returned.  See the
  426. DOS Environment section of the CFG.ADD file for the gory details.  If
  427. the switches are used by themselves, only the designated environment
  428. is updated.
  429.  
  430.  
  431. 4.4  MultiCommand Mode________________________________________________
  432.  
  433. CFG's MultiCommand mode allows more than one CommandName on the
  434. command line.  The standard separator between commands is the semi-
  435. colon.  CFG treats each section in MultiCommand mode completely
  436. independent of any other.  All switches and variables are reset, but
  437. environment changes are cumulative.  It is just like running the  program again.  See the Sample CONFIG.SYS section of the CFG.ADD file 
  438. for examples.  Help is not available in MultiCommand mode.
  439.  
  440. Be aware that DOS will strip semi-colons from passed parameters (%1,
  441. %2, etc.) in a batch file if that is how you build CFG's command line. 
  442. DOS does this because it treats a semi-colon as white space.
  443.  
  444.  
  445. 4.5  Number Base______________________________________________________
  446.  
  447. The /Bn switch allows you to specify the number base used by CFG.  All
  448. subsequent number input and output is with the specified base.  If the
  449. value of "n" is not 2, 8, 10 or 16, the switch is ignored with an
  450. error message.  In this case, the default base 10 is used.  The
  451. command must specifically support this switch for it to be in effect.
  452.  
  453.  
  454. 4.6  Return ErrorLevel________________________________________________
  455.  
  456. Generally, the exit ErrorLevel is 0 for off/invalid/disabled/etc. and
  457. 1 for on/valid/enabled/etc.  Specific values are given for each
  458. command.  An ErrorLevel of 255 generally indicates that an error
  459. occurred.  Commands with no particular exit ErrorLevel will always
  460. return 0.  A decimal output of the number may be placed in the
  461. environment if the /E@ switch is used.
  462.  
  463. To amplify the Global Switches description above:  /E displays the
  464. basic ErrorLevel as a decimal number.  /E+ displays the ErrorLevel
  465. with the CommandName and SubCommandName.  /E@ places the ErrorLevel in
  466. the environment variable "EL".  /E@ will not display the basic
  467. ErrorLevel.  Use /EE@ (or /E@E) to display the basic ErrorLevel with
  468. environment output.  The "+" option overrides the "E" option if both
  469. are used.  A "!" may be used in conjunction with any or all of these
  470. to tell CFG which ErrorLevel of a MultiCommand command line to return. 
  471. Clear as mud?
  472.  
  473.  
  474. 4.7  Messages_________________________________________________________
  475.  
  476. CFG's messages contain the following elements:
  477.  
  478.        - CFG's name
  479.        - CFG's version
  480.        - CommandName
  481.        - SubCommandName (if applicable)
  482.        - Command number (in MultiCommand mode)
  483.        - Error warning (if an error occurred)
  484.        - Message text
  485.        - ErrorLevel (for error messages)
  486.  
  487. CFG provides numerous error messages to make problems easier to
  488. diagnose and correct.  This is useful in CONFIG.SYS since rebooting
  489. multiple times to get things right can be tedious.  ErrorLevel
  490. reporting is available from both CONFIG.SYS and the command line
  491. although it can only be acted on from a batch file.
  492.  
  493.  
  494. 4.8  Notes____________________________________________________________
  495.  
  496. The following are general notes on program operation.
  497. 4.8.1  Usage From CONFIG.SYS and the Command Line_____________________
  498.  
  499. CFG is a dual mode program that will run both as a non-resident device
  500. driver from CONFIG.SYS and as a command line/batch file utility.  The
  501. title line of each command below specifies whether it can be used from
  502. CONFIG.SYS, from a BATCH file (command line) or from both.
  503.  
  504.  
  505. 4.8.2  On Loading High________________________________________________
  506.  
  507. CFG should *NOT* be loaded high while executing.  Doing so with third
  508. party programs may actually waste memory since stubs of the loader
  509. programs may remain resident in low memory.  Also, CFG requires 130 KB
  510. of memory to run for some commands.  If CFG is not placed in a UMB of
  511. requisite size, memory errors will occur.  Play it safe and run CFG
  512. low.
  513.  
  514.  
  515. 4.8.3  Case on the Command Line_______________________________________
  516.  
  517. Case does not matter in CONFIG.SYS since DOS capitalizes everything in
  518. the file during its parsing scans.  This shift to all upper case is
  519. pertinent when using the Cecho, Echo or EchoPause commands in
  520. CONFIG.SYS.
  521.  
  522. CFG does the same shift internally when parsing the command line, so
  523. you may use any mixture of case you desire on the CFG input line.
  524.  
  525.  
  526. 4.8.4  DOS Environment________________________________________________
  527.  
  528. The DOS command interpreter COMMAND.COM maintains an area of memory
  529. called the environment in which it stores specially formatted
  530. information that is globally available to all programs and batch
  531. files.  The environment block contains a list of ASCIIZ strings
  532. (strings of ASCII characters, each terminated by a zero byte) that
  533. store various information.  You may view the contents of the
  534. environment by typing "SET" at the command line prompt.
  535.  
  536. The DOS environment size for the resident command processor is
  537. specified with the SHELL command in CONFIG.SYS.  The COMMAND.COM
  538. /E:nnnnn switch specifies the environment size, where "nnnnn" must be
  539. in the range 160 through 32768.  DOS rounds this number up to a
  540. multiple of 16 bytes.  If "nnnnn" is less than 160 or greater than
  541. 32768, DOS uses the default size of 256 bytes and displays a
  542. "Parameter value not in allowed range" error (actually just a
  543. warning).  The environment size can only be changed by editing
  544. CONFIG.SYS and rebooting the system.  See the "Sample CONFIG.SYS"
  545. section below for an example SHELL line.
  546.  
  547. Each environment string is of the form "NAME=value", where NAME is
  548. capitalized and may be of reasonable length and "value" can be almost
  549. anything.  The only thing that cannot be in an environment string is
  550. an equals sign (since it separates the NAME and "value") and a zero
  551. byte (since it is the string terminator).  The environment is
  552. accessible via the DOS SET command.  DOS automatically capitalizes all
  553. NAME variables.  The CFG Env Set command and /@EnVar switch will allow
  554. you to specify exactly the case of the NAME.  See below how you can
  555. change this behavior.  Environment variables with lower case letters
  556. may be displayed by the DOS SET command, but they cannot be changed.
  557.  
  558. Each program receives a copy of the DOS environment for its local use
  559. on execution.  The size of this local environment is always rounded up
  560. to the next largest number divisible by 16 based on the total length
  561. of strings currently in the environment.  This is due to the way DOS
  562. allocates blocks of memory in paragraph (16 byte) amounts.  This
  563. leaves little or no room for further expansion and storage.
  564.  
  565. CFG manipulates the DOS environment(s) directly.  I normally dislike
  566. doing stuff like this, but it ended up being just too useful an
  567. ability to pass up.  CFG output is much easier to use by stuffing it
  568. into the environment and allowing DOS to do the string manipulations
  569. and concatenations.  Note that a batch file line that invokes
  570. environment variables will be processed by DOS using the active
  571. environment---CFG will never know environment variables were involved
  572. (and for my sanity, I do not want to know!).
  573.  
  574. Note that DOS will automatically extend the size of the active
  575. environment if it is adjacent to a free memory block and environment
  576. variables are entered from the command line.  As soon as a batch file
  577. or a program is loaded into memory, the size of the environment is
  578. constrained.  In the case of a secondary command processor, it will be
  579. cut off at the start of the next paragraph of memory.  This is what
  580. causes the environment of a secondary command processor to only have
  581. between 0 and 15 bytes of free space.
  582.  
  583. There are several methods to locate the master environment.  The pros
  584. and cons of each method are discussed in detail in Andrew Schulman's
  585. (et al) excellent book _Undocumented_DOS_ (Second Edition) [highly
  586. recommended!].  I refer you there for the detailed discussion. 
  587. Suffice it to say that the first method I used to locate the
  588. environment was to walk the chain of Memory Control Blocks to locate
  589. COMMAND.COM.  I had a problem with assumptions when I ran into 386^Max
  590. version 7 and its DOSMAX utility, which can load the COMMAND.COM stub
  591. into an UMB.  I (and others) had never expected this (silly us), so
  592. the routine failed.  I fixed this by linking in the UMB memory chain. 
  593. This, however, assumes that the memory manager involved supports the
  594. standard DOS UMB link and strategy commands.  Due to the possibility
  595. of faking this test out, it is now the secondary option available via
  596. the /1B switch.  The new default method is via the DOS Interrupt 1EH
  597. vector.  This method is available via the /1 or /1A switch.  Normally,
  598. you need just specify /1 on the command line for the master
  599. environment.  Neither /1 or /2 is required unless you need to specify
  600. the specific environment.
  601.  
  602. As a side note to all of this, PC Magazine published a Debug script in
  603. their January 25, 1994 issue that created UMB.COM.  This small utility
  604. changed the DOS memory strategy at the end of CONFIG.SYS execution so
  605. that the UMB area was the preferred load location when COMMAND.COM was
  606. being installed.  As you may expect, the master environment followed
  607. it into a UMB and CFG had a problem again.  This one is also fixed by
  608. the changes noted above.
  609.  
  610. Several people asked to change the default CFG uses for /@EnVar to
  611. always capitalizing the "EnVar".  I resist this simply because there
  612. may be systems that depend on that behavior.  Changing the default
  613. would change the way batch files are processed.  I added the "="
  614. option to /@ to give CFG this ability without changing the default. 
  615. Since "=" cannot be in an environment name, it is perfect for this
  616. application.
  617.  
  618.  
  619. 4.8.5  Undocumented DOS_______________________________________________
  620.  
  621. An unfortunate fact of life is that documentation is often terrible. 
  622. [This does not apply to me since I try to believe that my
  623. documentation is superb.  <VBG>]
  624.  
  625. One of the things the Microsoft does not document, but many people
  626. use, is a special DOS data area.  The data area goes by several
  627. popular names:  List of Lists, SysVars, SysInitVars.  Whatever you
  628. call it, DOS cannot exist without this group of variables.  Neither
  629. can CFG.  I note in each section of this file if the particular
  630. command uses undocumented information.  In most cases, this use of
  631. undocumented DOS starts with that special DOS data area.  This is a
  632. relatively minor use of undocumented DOS, as such things go, but I
  633. feel compelled to admit its use since I am providing a general utility
  634. program that is intended to be reliable under all versions of MS-DOS. 
  635. [Note that I say MS-DOS.  Please do not hold me responsible for
  636. DR/Novell DOS or 4DOS/NDOS.]
  637.  
  638. I must acknowledge Andrew Schulman as the master of undocumented DOS. 
  639. That said, I recommend his Undocumented DOS, Second Edition as a basic
  640. source for an explanation of undocumented DOS calls.  There are
  641. several other texts that also pertain.  These are listed in the
  642. bibliography.  I heartily recommend all of them as a basic reference
  643. library if you are trying to program for DOS.  You can certainly
  644. accomplish much using only documented functions, but the use of
  645. undocumented functions and data structures is the only way to
  646. accomplish some tasks.  Witness some of the functions that CFG
  647. provides.
  648.  
  649. If you have any undocumented DOS questions, I will be happy to answer
  650. them.  Alternatively, I recommend the "Undocumented Corner" (Section
  651. 4) of the Doctor Dobbs Journal Forum on CompuServe (GO CIS:DDJFORUM)
  652. as the ultimate source.  Andrew Schulman, Jim Kyle, Geoff Chappell,
  653. Max Pietrek and many other notables of undocumented programming hang
  654. out there (I lurk, I do not consider myself such a notable).
  655.                          Chapter 5:  Commands
  656.  
  657.  
  658. The commands below are generally in alphabetical order except for
  659. those which are closely related by function.  The leading "▒▒▒" for
  660. each command is required for the search engine in the CFG Help
  661. command.
  662.  
  663. All command line formats and examples given below should be understood
  664. to begin with "Device=[d:][path]Cfg.Com " in the CONFIG.SYS file or
  665. "[d:][path]Cfg " from the command line unless specified otherwise.
  666.  
  667.  
  668. ▒▒▒Add ▒▒▒Sub ▒▒▒Mul ▒▒▒Div ▒▒▒Mod ▒▒▒And ▒▒▒Or ▒▒▒Xor ▒▒▒Not  [BATCH]
  669.  
  670. Perform various arithmetic operations on the arguments.
  671.  
  672. Command line format:
  673.  
  674.       Add [/@EnVar] [/Q] [/Bn] a b c ...
  675.       Sub [/@EnVar] [/Q] [/Bn] a b c ...
  676.       Mul [/@EnVar] [/Q] [/Bn] a b c ...
  677.       Div [/@EnVar] [/Q] [/Bn] a b
  678.       Mod [/@EnVar] [/Q] [/Bn] a b
  679.  
  680.       And [/@EnVar] [/Q] [/Bn] a b
  681.       Or  [/@EnVar] [/Q] [/Bn] a b
  682.       Xor [/@EnVar] [/Q] [/Bn] a b
  683.       Not [/@EnVar] [/Q] [/Bn] a
  684.  
  685. CFG performs internal 64-bit arithmetic and returns a 32-bit result. 
  686. With this accuracy, the largest number CFG can handle is 2^^32-1, or
  687. 4,294,967,295.  This should be adequate for most purposes.  CFG
  688. performs unsigned operations so all values must be positive.  All
  689. commands support the /Bn Base switch.  Also see the Convert command
  690. for converting numbers between number bases.
  691.  
  692. Add - Sums the numbers on the command line.  An overflow error is
  693. generated if the result exceeds the 32-bit limit given above.
  694.  
  695. Sub - Subtracts the number "b", "c", etc. from "a".  An underflow
  696. error is generated if the result goes negative.
  697.  
  698. Mul - Multiplies the numbers on the command line.  An overflow error
  699. is generated if the result exceeds the 32-bit limit given above.
  700.  
  701. Div - Divides "a" by "b" and returns the quotient.  A divide by zero
  702. error is generated if the divisor "b" is zero.
  703.  
  704. Mod - Divides "a" by "b" and returns the remainder.  A divide by zero
  705. error is generated if the divisor "b" is zero.
  706.  
  707. And - Performs a bitwise AND of "a" and "b".
  708.  
  709. Or - Performs a bitwise OR of "a" and "b".
  710.  
  711. Xor - Performs a bitwise exclusive OR of "a" and "b".
  712.  
  713. Not - Takes the inverse of "a".
  714.  
  715.  
  716. ▒▒▒ANSI  . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  717.  
  718. Determine if the ANSI driver is loaded in memory.
  719.  
  720. Command line format:
  721.  
  722.       ANSI
  723.  
  724. Exit ErrorLevels:
  725.  
  726.       0  = ANSI is not installed
  727.       1  = ANSI is installed
  728.  
  729. Determines if any ANSI driver is installed by writing an ANSI cursor
  730. positioning string to the screen.
  731.  
  732.  
  733. ▒▒▒ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  734.  
  735. Read input numbers and write the corresponding ASCII characters.
  736.  
  737. Command line format:
  738.  
  739.       ASCII [/Bn] a b c ...
  740.  
  741. where "a b c ..." represent numbers.  The command reads the numbers
  742. and writes the corresponding ASCII characters to DOS StdOut, allowing
  743. the output to be redirected as desired.  This is a very useful way of
  744. creating short temporary files or sending printer control characters. 
  745. The quantity of input numbers is limited only by DOS command line
  746. length.  The /Bn Base switch specifies the number base to be used for
  747. command line numbers.  The /Q switch has no affect on this command. 
  748. Numbers greater than 255 are ignored.
  749.  
  750. Example command use:
  751.  
  752.       Cfg RandomFile /@RETURN %TEMP%
  753.       Cfg ASCII 64 67 68 32 > %TEMP%\%RETURN%.BAT
  754.       CD >> %TEMP%\%RETURN%.BAT
  755.  
  756. This example creates a unique random file name in the system TEMP
  757. directory, writes "@CD " to the temporary batch file and adds the
  758. current directory.  Executing %TEMP%\%RETURN%.BAT will return you to
  759. the current directory.
  760.  
  761.  
  762. ▒▒▒Beep  . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  763.  
  764. Beep the speaker.
  765.  
  766. Command line format:
  767.  
  768.       Beep [m n [, m n] ... ] [/Bn] [/N]
  769.  
  770. where "m" corresponds to a frequency in Hertz and "n" corresponds to
  771. the number of 1/18 second increments that comprise the duration.  The
  772. /N switch tells CFG to not flush the keyboard buffer prior to
  773. executing the command.  If nothing is specified, the default sound is
  774. a C note for 1/6 of a second (1046,3).  By separating the argument
  775. pairs with commas, a series of tones may be produced with the same
  776. command.  Pressing any key while playing ends the command.  Commas are
  777. strictly interpreted as separators.
  778.  
  779.  
  780. ▒▒▒Blink . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  781.  
  782. Enable blinking screen characters.
  783.  
  784. Command line format:
  785.  
  786.       Blink
  787.  
  788. Calls Interrupt 10H Function 10H Subfunction 3 to enable blinking
  789. characters on EGA and above.  Any characters with intense backgrounds
  790. will start blinking.
  791.  
  792.  
  793. ▒▒▒Boot  . . . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  794.  
  795. Modify CONFIG.SYS in memory during execution.
  796.  
  797. Command line format:
  798.  
  799.       Boot SubCommandName
  800.  
  801. NOTE:  Uses undocumented information.
  802.  
  803. The following are valid SubCommandNames: NoError.  Each SubCommandName
  804. may be abbreviated as desired.  Error messages are displayed if the
  805. routine fails.
  806.  
  807. NoError:  Scans the tokenized CONFIG.SYS file in memory and changes
  808. any lines which will display an "Unknown command" error to a Remark. 
  809. This effectively hides errors from the DOS parser.  This option
  810. currently works under DOS version 5.0 only.
  811.  
  812. Additional SubCommands are under development.
  813.  
  814. The NoError option will report the number of errors which it cleared. 
  815. It is important to note that this only works on DEVICE statements in
  816. CONFIG.SYS since general parameters (such as FILES, BUFFERS or SHELL)
  817. are evaluated prior to loading device drivers.
  818.  
  819.  
  820. ▒▒▒Border  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  821.  
  822. Set the screen border color.
  823.  
  824. Command line format:
  825.  
  826.       Border [Color]
  827.  
  828. The notes on colors for the Cls command apply to the Border command
  829. except as noted here.
  830.  
  831. If no color is given or an invalid color is specified, the current
  832. screen background color at the cursor location is used.  If anything
  833. appears after the CommandName that cannot be parsed as a color, an
  834. error message is displayed.
  835.  
  836.  
  837. ▒▒▒Break . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  838.  
  839. Determine status of DOS extended Break checking.
  840.  
  841. Command line format:
  842.  
  843.       Break
  844. Exit ErrorLevels:
  845.  
  846.       0 = Break is off
  847.       1 = Break is on
  848.  
  849.  
  850. ▒▒▒CanCopy . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  851.  
  852. Determine if there is enough room to copy files to a disk.
  853.  
  854. Command line format:
  855.  
  856.       CanCopy FileSpec [d:]
  857.  
  858. Exit ErrorLevels:
  859.  
  860.         0 = No room to copy files or DOS file error
  861.         1 = Room to copy files
  862.  
  863. where FileSpec can use any DOS wildcards and "d:" corresponds to a
  864. valid DOS drive.  If "d:" is omitted, the default drive is used.  The
  865. FileSpec search is not recursive.  It will examine only the directory
  866. specified.
  867.  
  868.  
  869. ▒▒▒Cecho . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  870.  
  871. Echo text to the screen with the specified colors.
  872.  
  873. Command line format:
  874.  
  875.       Cecho [/I|/K] [/C|/N] "Fore [on] Back" String
  876.  
  877. The desired screen color for String must be enclosed in double quotes. 
  878. The notes for the Cls command use of colors apply.  The /C switch is
  879. used to output a carriage return only at the end of the String,
  880. returning the cursor to the first column for overwriting the previous
  881. output.  The /I switch calls the Intense command to enable intense
  882. backgrounds on EGA and above.  The /K switch calls the Blink command
  883. to enable blinking characters on EGA and above.  The /N switch is used
  884. to eliminate the final carriage return/line feed, leaving the cursor
  885. at the end of the String just displayed.  /I takes precedence over /K
  886. and /N takes precedence over /C if all are included.
  887.  
  888. The displayed String starts with the first character after the closing
  889. double quote of the color, leading spaces are included.  The Echo
  890. command line format applies to the String.  The /Q switch has no
  891. affect on this command.
  892.  
  893.  
  894. ▒▒▒Cls . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  895.  
  896. Clear the screen with a choice of foreground and background colors.
  897.  
  898. Command line format:
  899.  
  900.       Cls [Foreground [on] Background]
  901.  
  902. The following colors may be used:
  903.  
  904.       - Black     - Grey
  905.       - Blue      - Bright Blue
  906.       - Green     - Bright Green
  907.       - Cyan      - Bright Cyan
  908.       - Red       - Bright Red
  909.       - Magenta   - Bright Magenta
  910.       - Yellow    - Bright Yellow
  911.       - White     - Bright White
  912.  
  913. If any bright color in the right column is chosen for a background,
  914. the video display is reprogrammed to show intense background colors
  915. vice blinking text.  Programs may reset this, causing all text on the
  916. screen to start blinking.
  917.  
  918. If ANSI is not installed, the screen is cleared using a BIOS window
  919. scroll.  The screen colors may not remain permanent depending on the
  920. behavior of the video adapter.  If ANSI is installed before CFG is
  921. run, CFG will detect it and use ANSI escape sequences to change system
  922. colors.
  923.  
  924. If no colors a given or if an invalid combination is used, the current
  925. screen colors at the cursor location are used.  If anything appears
  926. after the CommandName that cannot be parsed as a color, an error
  927. message is displayed with a three second WaitFor pause prior to
  928. continuing with the clear screen.
  929.  
  930. Cls sets the screen border (overscan register) to the same color as
  931. the background.  Use the Border command if you want to change this. 
  932. It also restores the cursor size to what it was initially since some
  933. ANSI clear screen routines change the cursor size.
  934.  
  935. NOTE:  The "Bright ..." colors are scanned on the command line with
  936. only a single space between the words.  This was done to simplify the
  937. parsing routine.  Otherwise, CFG will accept any number of spaces
  938. between words.
  939.  
  940.  
  941. ▒▒▒CodePage  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  942.  
  943. Determine the current system code page table.
  944.  
  945. Command line format:
  946.  
  947.       CodePage [/Q] [/@EnVar]
  948.  
  949. Exit ErrorLevels:
  950.  
  951.       0   = Code Page 437  [English-United States]
  952.       1   = Code Page 850  [Multilingual (Latin I)]
  953.       2   = Code Page 852  [Slavic (Latin II)]
  954.       3   = Code Page 860  [Portugal]
  955.       4   = Code Page 861  [Iceland]
  956.       5   = Code Page 863  [French Canadian]
  957.       6   = Code Page 865  [Norway/Denmark]
  958.       254 = Unknown Code Page
  959.       255 = Invalid DOS version
  960.  
  961. The code page number is displayed.  This command requires DOS version
  962. 3.3 or higher.
  963.  
  964.  
  965. ▒▒▒ColdBoot  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  966.  
  967. Perform equivalent of a power-on system reset.
  968.  
  969. Command line format:
  970.  
  971.       ColdBoot SubCommandName [/V]
  972.  
  973. The following are valid SubCommandNames: WaitFor, WaitTo, Verify. 
  974. Each SubCommandName may be abbreviated as desired.  Error messages are
  975. displayed if the routine fails.  All disk buffers that may not yet be
  976. written are flushed to disk via Interrupt 21H Function 0DH (Disk
  977. Reset) prior to system reset.  For 8086/8088 processors only, the
  978. command jumps to FFFF:0000 after clearing the warm boot flag in the
  979. BIOS data area.  For 80286+ processors, the system is reset via the
  980. keyboard controller.  The /V Verify switch is available for use with
  981. the WaitFor and WaitTo subcommands.
  982.  
  983. WaitFor:  Executes the WaitFor command first.  All command line
  984. options of the WaitFor command are available.
  985.  
  986. WaitTo:  Executes the WaitTo command first.  All command line options
  987. of the WaitTo command are available.
  988.  
  989. Verify:  Prompt before rebooting.
  990.  
  991.  
  992. ▒▒▒Color . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  993.  
  994. Set the screen color for future output using ANSI escape sequences
  995. without clearing the screen.
  996.  
  997. Command line format:
  998.  
  999.       Color Foreground [on] Background
  1000.  
  1001. The notes on colors for the Cls command apply to the Color command
  1002. except as noted here.
  1003.  
  1004. ANSI must be installed.  If it is not installed, the command is
  1005. aborted with an error message.  If no colors are given or if an
  1006. invalid combination is used, an error message is displayed.
  1007.  
  1008. The Color command is designed to be used immediately after ANSI has
  1009. been loaded into memory to set its default colors from white on black
  1010. to what you desire.  It may also be used to highlight the output of a
  1011. specific program or group of programs that do not use the BIOS for
  1012. output.  Note that Color will not repaint the screen.  It only sets
  1013. the color of any future output made via DOS.  Use the Cls command to
  1014. reset the entire screen.
  1015.  
  1016.  
  1017. ▒▒▒Cols  . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1018.  
  1019. Determine the number of displayed columns.
  1020.  
  1021. Command line format:
  1022.  
  1023.       Cols
  1024.  
  1025. The returned ErrorLevel is based on the value stored in the BIOS data
  1026. area.
  1027.  
  1028.  
  1029. ▒▒▒ComBaud . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1030.  
  1031. Returns the baud rate of the indicated serial port.
  1032.  
  1033. Command line format:
  1034.  
  1035.       ComBaud n [/Q] [/@EnVar]
  1036.  
  1037. Exit ErrorLevels:
  1038.  
  1039.       0  = Error        7  = 4800 baud
  1040.       1  = 110 baud     8  = 9600 baud
  1041.       2  = 150 baud     9  = 14,400 baud
  1042.       3  = 300 baud     10 = 19,200 baud
  1043.       4  = 600 baud     11 = 38,400 baud
  1044.       5  = 1200 baud    12 = 57,600 baud
  1045.       6  = 2400 baud    13 = 115,200 baud
  1046.  
  1047. where "n" is the serial port to be tested.  Valid numbers are 1, 2, 3
  1048. and 4.  An error message is given if the port is missing or invalid.
  1049.  
  1050. The exact baud rate is displayed.  An intermediate rate will return
  1051. the ErrorLevel of the faster rate.
  1052.  
  1053.  
  1054. ▒▒▒ComHide . . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  1055.  
  1056. Hide and restore the serial port base addresses.
  1057.  
  1058. Command line format:
  1059.  
  1060.       ComHide SubCommandName
  1061.  
  1062. The following are valid SubCommandNames: Hide, Restore.  Each
  1063. SubCommandName may be abbreviated as desired.  Error messages are
  1064. displayed if the routine fails.
  1065.  
  1066. ComHide hides the serial port base addresses by copying them to
  1067. another location in memory when the Hide option is used.  On
  1068. restoration with the Restore option, ComHide verifies the signature
  1069. and checksum stored with the port addresses to ensure that they were
  1070. not accidently over-written while hidden.  ComHide then copies the
  1071. base addresses back to their normal location.
  1072.  
  1073. The default location for the hidden data is 7001:0000 for DOS versions
  1074. before 5.0.  This is below the 512 KB boundary in the event that the
  1075. machine only has that much base memory available, and high enough to
  1076. keep it from being over-written during execution of other device
  1077. drivers while the data is hidden.  For DOS Version 5.0+, the location
  1078. will vary depending on what the SysInit loader module reports as the
  1079. maximum available memory in the device driver header.  This prevents
  1080. interference with the larger memory requirements in the upper areas
  1081. around the 640 KB point that can occur under DOS 6.0+ with large
  1082. multiple-configuration CONFIG.SYS files.
  1083.  
  1084. Example command lines:
  1085.  
  1086.       CFG.COM ComHide Hide
  1087.       MANGLE.SYS
  1088.       CFG.COM ComHide Restore
  1089.  
  1090.  
  1091. ▒▒▒Compare . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1092.  
  1093. Compare two strings.
  1094.  
  1095. Command line format:
  1096.  
  1097.       Compare [/C] String1 String2
  1098.  
  1099. Exit ErrorLevels:
  1100.  
  1101.       0 = Strings are not the same
  1102.       1 = Strings are the same
  1103.  
  1104. String1 and String2 must be a single group of characters, containing
  1105. no separators.  The comparison is case sensitive.  The /C switch makes
  1106. the comparison case insensitive.
  1107.  
  1108.  
  1109. ▒▒▒ComSet  . . . . . . . . . . . . . . . . . . . . . .  [BATCH/CONFIG]
  1110.  
  1111. Sets the serial port base addresses to a default or specified value.
  1112.  
  1113. Command line format:
  1114.  
  1115.       ComSet a [b]
  1116.  
  1117. Where "a" corresponds to the desired port base address to set: 1, 2, 3
  1118. or 4.  The "b" corresponds to an optional hexadecimal value to set the
  1119. port base address to.  No checking is performed to warn of values
  1120. being overwritten.  Use this command carefully.
  1121.  
  1122. This command places a default port base address value (or the
  1123. specified value) in the appropriate location in the low memory DOS
  1124. data area.  The default values used for the ports are 3F8H, 2F8H, 3E8H
  1125. and 2E8H.  If your system uses different values, you must specify them
  1126. as "b" on the command line.
  1127.  
  1128. You can set multiple base addresses to the same value to access the
  1129. same physical port using different DOS port names.  Note that this
  1130. command does not address any changes with the IRQ associated with a
  1131. specific port.
  1132.  
  1133.  
  1134. ▒▒▒ComSwap . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1135.  
  1136. Swap the serial base port addresses for the two serial ports
  1137. specified.
  1138.  
  1139. Command line format:
  1140.  
  1141.       ComSwap a b
  1142.  
  1143. where "a" and "b" are the numbers of the serial ports to be swapped. 
  1144. Valid numbers are 1, 2, 3 and 4.  An error message is given if one of
  1145. the ports is missing or invalid.
  1146.  
  1147. ComSwap switches the two ports as far as DOS is concerned.  This is
  1148. useful if you need to shift the port addresses around prior to loading
  1149. software device drivers.  This command may not have any effect for
  1150. programs that use hard-coded port addresses.  This command can not
  1151. shift hardware IRQ values.  The contents of the port addresses are not
  1152. checked during the swap.
  1153.  
  1154. Example command line:
  1155.  
  1156.       ComSwap 4 2
  1157.  
  1158.  
  1159. ▒▒▒Convert . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1160.  
  1161. Changes numbers between number base systems.
  1162.  
  1163. Command line format:
  1164.  
  1165.       Convert a b [/Bn]
  1166.  
  1167. where "a" is in the base specified by the /Bn switch (or the default
  1168. decimal system) and "b" is a decimal number specifying the base to
  1169. convert "a" to.
  1170.  
  1171.  
  1172. ▒▒▒CoProc  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1173.  
  1174. Determine the Intel CoProcessor installed.
  1175.  
  1176. Command line format:
  1177.  
  1178.       CoProc [/Q]
  1179.  
  1180. Exit ErrorLevels:
  1181.  
  1182.       0 = No coprocessor installed
  1183.       1 = 8087
  1184.       2 = 80287
  1185.       3 = 80387DX or 80387SX
  1186.       4 = 80486DX or 80487SX
  1187.       5 = Pentium
  1188.  
  1189. This routine uses the Intel recommended techniques for properly
  1190. determining what type of coprocessor is installed in the system.
  1191.  
  1192. Use the CPU command to determine which processor is present.
  1193.  
  1194.  
  1195. ▒▒▒Country . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1196.  
  1197. Determine the country code or return country specific information.
  1198.  
  1199. Command line format:
  1200.  
  1201.       Country [n] [/Q] [/@EnVar]
  1202.  
  1203. where "n", if present, is a decimal value between 0 and 9 that returns
  1204. the following information:
  1205.  
  1206.  n    ErrorLevel  String                Description
  1207. ────  ──────────  ────────────────────  ─────────────────────────────
  1208. None       ?      Decimal number        Country code
  1209.  0         0      Decimal number        Date: USA, mm dd yy
  1210.            1      Decimal number            : Europe, dd mm yy
  1211.            2      Decimal number            : Japan, yy mm dd
  1212.  1         0      Currency symbol
  1213.  2         0      Thousands separator
  1214.  3         0      Decimal separator
  1215.  4         0      Date separator
  1216.  5         0      Time separator
  1217.  6         0      Decimal number        Currency: Symbol before value
  1218.            1      Decimal number                : Symbol follows value
  1219.            2      Decimal number                : Symbol replaces
  1220.                                                   decimal point
  1221.  7         ?      Decimal number        Digits after currency decimal
  1222.  8         0      Decimal number        Time: 12-hour clock
  1223.            1      Decimal number            : 24-hour clock
  1224.  9         0      Data-list separator
  1225.  
  1226. The "n" values 1, 2, 3, 4, 5 and 9 are also valid for the Now command
  1227. to include in its output.  See the Now command for use.
  1228.  
  1229.  
  1230. ▒▒▒CPU   . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1231.  
  1232. Determine the Intel Microprocessor installed.
  1233.  
  1234. Command line format:
  1235.  
  1236.       CPU
  1237.  
  1238. Exit ErrorLevels:
  1239.  
  1240.       0 = 8086/8088
  1241.       1 = 80286
  1242.       2 = 80386DX or 80386SX
  1243.       3 = 80486SX
  1244.       4 = 80486DX or 80487SX
  1245.       5 = Pentium
  1246.  
  1247. This routine uses the Intel recommended techniques for properly
  1248. determining what type of CPU is installed in the system.  If an 486
  1249. class microprocessor has been recognized, CFG will determine if the
  1250. CPU has a floating point unit (486 DX CPU, 487 SX MCP) or not (486 SX
  1251. CPU).  For Pentium processors, the vendor identification returned by
  1252. the chip is displayed.  For Intel Pentium processors, the step level,
  1253. model and family numbers are also displayed.
  1254.  
  1255. Use the CoProc command to determine which math coprocessor is present.
  1256.  
  1257.  
  1258. ▒▒▒Cursor  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1259.  
  1260. Change the size of the text mode screen cursor.
  1261.  
  1262. Command line format:
  1263.  
  1264.       Cursor {SubCommandName|a b}
  1265.  
  1266. where "a" and "b" are decimal numbers of the start and stop screen
  1267. scan lines for the cursor.  The following are valid SubCommandNames:
  1268. Default, Hide, Restore.  Each SubCommandName may be abbreviated as
  1269. desired.  If the routine fails, error messages are displayed and the
  1270. cursor size is not changed.
  1271.  
  1272. Default:  Returns the cursor to the default values given below.
  1273.  
  1274. Hide:  Sets the "invisible" bit code using Interrupt 10H Function 1.
  1275.  
  1276. Restore:  Sets the "normal" bit code.  Some programs may modify this
  1277. on their own.  There are known bugs in these functions in some EGA
  1278. BIOS 43 line modes.
  1279. The start and stop scan lines are numbered with line 1 at the bottom
  1280. and increasing towards the top.  Using this convention, the following
  1281. cursor values apply:
  1282.  
  1283.                     │ 25 line │ 43/50 line │
  1284.             Adapter │ Default │  Default   │ Maximum
  1285.             ────────┼─────────┼────────────┼────────
  1286.             CGA     │   1 2   │     ---    │     8
  1287.             EGA     │   2 3   │     2 2    │    14
  1288.             VGA+    │   2 3   │     2 2    │    16
  1289.  
  1290. This numbering scheme is a little more consistent than what the BIOS
  1291. expects and lets the program calculate the values required by the
  1292. BIOS.  If a number greater than the maximum number of scan lines is
  1293. entered, it is truncated to the maximum.
  1294.  
  1295. Note that after a mode reset the cursor will be returned to its
  1296. default size by the BIOS.  You will need to issue the appropriate
  1297. command to set it to the desired shape.
  1298.  
  1299. Video adapter BIOS' implement the cursor functions differently.  You
  1300. may not get the results you expect when you specify scan lines,
  1301. depending on your adapter.  Keep trying until you end up with a shape
  1302. you like.
  1303.  
  1304. Example command lines:
  1305.  
  1306.       Cursor Hide
  1307.       Cursor 2 2
  1308.  
  1309.  
  1310. ▒▒▒Day  ▒▒▒WeekDay ▒▒▒Month  ▒▒▒Year ▒▒▒FullYear . . . . . . . [BATCH]
  1311. ▒▒▒Hour ▒▒▒Minute  ▒▒▒Second ▒▒▒AM   ▒▒▒PM
  1312.  
  1313. Determine the return value for the appropriate command.
  1314.  
  1315. Command line format consists of the CommandName.  Valid CommandNames
  1316. and the range of their return ErrorLevels are:
  1317.  
  1318.       WeekDay  . . . . . 0-6   *
  1319.       Day  . . . . . . . 1-31  *
  1320.       Month  . . . . . . 1-12  *
  1321.       Year . . . . . . . 0-119
  1322.       FullYear . . . . . 0-99
  1323.       Hour . . . . . . . 0-23  *
  1324.       Minute . . . . . . 0-59  *
  1325.       Second . . . . . . 0-59
  1326.       AM . . . . . . . . 0-1
  1327.       PM . . . . . . . . 0-1
  1328.  
  1329. For WeekDay, an ErrorLevel of 0 corresponds to Sunday.  For Year, the
  1330. ErrorLevel corresponds to the number of years since 1980.  FullYear
  1331. gives the last two digits of the current year.  For AM and PM, an
  1332. ErrorLevel of 1 is True, 0 is False.
  1333.  
  1334. The commands with an asterisk also accept a single decimal number
  1335. after the CommandName and compare it to the ErrorLevel that would be
  1336. generated for the standard command.  If the values are equal, the
  1337. return ErrorLevel is 1, otherwise it is 0.  This allows comparisons to
  1338. be done by CFG vice using convoluted If ErrorLevel batch file
  1339. structures.
  1340.  
  1341.  
  1342. ▒▒▒DESQview  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1343.  
  1344. Determine if Quarterdeck's DESQview is running.
  1345.  
  1346. Command line format:
  1347.  
  1348.       DESQview
  1349.  
  1350. Exit ErrorLevels:
  1351.  
  1352.       0    = DESQview is not running
  1353.       Else = DESQview version [(32*major)+minor]
  1354.  
  1355. Version 1.x identifies itself as version 1.0.
  1356.  
  1357.  
  1358. ▒▒▒Device  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1359.  
  1360. Determine if the specified device driver is resident in memory, rename
  1361. it or display a list of installed drivers.
  1362.  
  1363. Command line format:
  1364.  
  1365.       Device SubCommandName {Options}
  1366.  
  1367. Exit ErrorLevels for Exist SubCommand:
  1368.  
  1369.       0 = Not installed (also format error)
  1370.       1 = Installed
  1371.  
  1372. Exit ErrorLevels for Rename SubCommand:
  1373.  
  1374.       0 = Not renamed (also format error)
  1375.       1 = Renamed
  1376.  
  1377. NOTE:  Uses undocumented information.
  1378.  
  1379. The following are valid SubCommandNames: Exist, List, Rename.  Each
  1380. SubCommandName may be abbreviated as desired.  An error message is
  1381. displayed if there is a format error.
  1382.  
  1383. Exist DeviceName:  This command scans the linked list of device
  1384. drivers and checks if the requested DeviceName is in the chain.  It is
  1385. important to note that this command searches for the *DOS* driver
  1386. name, not the name of the file on disk.  For example, SmartDrive's
  1387. driver name is SMARTAAR, EMM386's is EMMXXXX0 and Symantec's Ncache2
  1388. is @CACHE-X.  Some drivers hook in multiple driver headers and names
  1389. for compatibility (Ncache2 also hooks SMARTAAR into the chain).
  1390.  
  1391. List:  The DOS names of the installed device drivers are displayed. 
  1392. *All* device names are displayed, including block devices which often
  1393. contain garbage, but sometimes have a name in their last seven places. 
  1394. Characters below ASCII 032 are replaced with ASCII 176 ("░") for
  1395. display purposes.
  1396.  
  1397. Rename DeviceName1 DeviceName2:  DeviceName1 is changed to
  1398. DeviceName2.  An error is displayed if the DeviceName1 is not found,
  1399. the DeviceName2 is omitted or if DeviceName2 is longer than eight
  1400. characters.  Use this function with care since system operation my
  1401. change as a result.
  1402.  
  1403.  
  1404. ▒▒▒Dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1405.  
  1406. Get the current drive and directory.
  1407.  
  1408. Command line format:
  1409.  
  1410.       Dir [/Q] [/@EnVar] [Path]
  1411.  
  1412. Exit ErrorLevels:
  1413.  
  1414.       0  = Successful
  1415.       Else = DOS error number
  1416.  
  1417. The resultant directory path includes the current drive.  A final "\"
  1418. is not appended.  If anything is included on the command line, it is
  1419. assumed to be a request for a canonicalized name of the supplied Path. 
  1420. The input path need not actually exist.  If the Path is on a JOINed
  1421. drive, the returned name is the one that would be needed if the drive
  1422. were not JOINed; similarly for a SUBSTed, ASSIGNed or network drive
  1423. letter.  For this reason, it is possible to get a qualified name that
  1424. is not legal under the current combination of SUBSTs, ASSIGNs, JOINs
  1425. and network redirections.
  1426.  
  1427. If the requested Path starts with ".." or ".", they are resolved to
  1428. the parent directory and current directory, including drive letter,
  1429. using DOS Function 60H.  See the FileDir command for extracting the
  1430. directory path from a supplied file name.
  1431.  
  1432.  
  1433. ▒▒▒DirExist  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1434.  
  1435. Determine if the requested directory exists on disk.
  1436.  
  1437. Command line format:
  1438.  
  1439.       DirExist [d:][path]DirectoryName
  1440.  
  1441. Exit ErrorLevels:
  1442.  
  1443.       0 = Directory does not exist
  1444.       1 = Directory exists
  1445.  
  1446.  
  1447. ▒▒▒Display . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1448.  
  1449. Determine the display combination code.
  1450.  
  1451. Command line format:
  1452.  
  1453.       Display
  1454.  
  1455. Exit ErrorLevels:
  1456.  
  1457.        1 = MDA
  1458.        2 = CGA
  1459.        4 = EGA color
  1460.        5 = EGA mono
  1461.        6 = PGS
  1462.        7 = VGA mono
  1463.        8 = VGA color
  1464.       11 = MCGA mono
  1465.       12 = MCGA color
  1466.  
  1467.  
  1468. ▒▒▒DosKey  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1469.  
  1470. Determine if the DOSKEY command line editing and recall program is
  1471. installed or input/retrieve previous command lines.
  1472.  
  1473. Command line format:
  1474.  
  1475.       DosKey [/I] [/M] [/@EnVar]
  1476.  
  1477. Exit ErrorLevels for /I:
  1478.  
  1479.        0 = Not installed or invalid DOS version
  1480.        1 = Installed
  1481.  
  1482. The /I Installation switch overrides all others.  All previous command
  1483. line entries are accessible via the cursor keys.  All of the normal
  1484. DOS editing keys available with DOSKEY installed are accessible via
  1485. this command except for F7 Redisplay Commands.
  1486.  
  1487. DOSKEY macros are available via this command.  See the CFG.ADD file
  1488. for the nuances of DOSKEY's operation with regards to macros and this
  1489. command.  If a macro name or a command with DOSKEY special parameters
  1490. may be entered, the /M Macro switch must be specified.  Since DOSKEY
  1491. automatically displays its string on screen, the /Q switch is
  1492. permanently in effect.  Note that DOSKEY does not append a carriage
  1493. return/line feed to its string.  This must be provided, if desired, in
  1494. the batch file.  This command requires DOS version 5.0 or higher.
  1495.  
  1496. DOSKEY has only one buffered input function besides its installation
  1497. check. When this function returns, an output buffer identical to that
  1498. required for DOS Interrupt 21H Function 0AH is filled with the user
  1499. input.  If the user input a DOSKEY macro name or a string with special
  1500. DOSKEY parameters, this buffer is empty and the function must be
  1501. called again to obtain the expansion.  This is what the /M Macro
  1502. switch checks for.  One side effect of this check is that if a
  1503. carriage return is input on a blank line, DOSKEY returns the same
  1504. information when it signals a macro expansion is pending.  Since CFG
  1505. cannot tell the difference between DOSKEY's output in these two
  1506. situations, the program is written to assume that a macro/special
  1507. parameter has been entered and loop back to retrieve the expansion of
  1508. the macro/special parameter.  The result is that with /M specified, a
  1509. carriage return on a blank line will loop.  At least one character
  1510. must be entered to break out of the loop.
  1511.  
  1512. If a macro expands to several commands (i.e. commands separated by the
  1513. "$t" special character), each must be removed individually from
  1514. DOSKEY's buffer.  Assigning each to a unique EnVar will keep them
  1515. straight.  Executing the EnVar will execute the command line as if it
  1516. had been typed from the DOS command line.
  1517.  
  1518.  
  1519. ▒▒▒DOSlocation . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1520.  
  1521. Determine the location of the DOS kernel.
  1522.  
  1523. Command line format:
  1524.  
  1525.       DOSlocation SubCommandName
  1526.  
  1527. The following are valid SubCommandNames: RAM, ROM, High, Low.  Each
  1528. SubCommandName may be abbreviated as desired, but must be unique.  The
  1529. return ErrorLevel is 1 if True and 0 if False.
  1530.  
  1531.  
  1532. ▒▒▒DOSstartup  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1533.  
  1534. Determine the drive from which DOS was booted.
  1535.  
  1536. Command line format:
  1537.  
  1538.       DOSstartup [/Q] [/@EnVar]
  1539.  
  1540. This command uses DOS Function 33H Subfunction 5 to determine the boot
  1541. drive.  This command requires DOS version 4.0 or higher.  If DOS is in
  1542. ROM, the command returns the drive CONFIG.SYS is on.  The drive letter
  1543. is also written.
  1544.  
  1545.  
  1546. ▒▒▒DOSversion  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1547.  
  1548. Determine the DOS version.
  1549.  
  1550. Command line format consists of only the CommandName.  Valid
  1551. CommandNames are:
  1552.  
  1553.       DOSmajor
  1554.       DOSminor
  1555.       DOSversion [/T]
  1556.  
  1557. For DOSminor, the return ErrorLevel is 10 for DOS 3.10, 31 for DOS
  1558. 3.31, etc.  For DOSversion, the return ErrorLevel is equal to
  1559. (32*major)+minor.  Note that DOS 4.01 reports itself as 4.00.  The /T
  1560. True Version switch executes the DOS 5.0+ Interrupt 21H Function 33H
  1561. Subfunction 06H.  The regular DOS version function is used if this
  1562. call fails.
  1563.  
  1564.  
  1565. ▒▒▒Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1566.  
  1567. Determine the current default drive.
  1568.  
  1569. Command line format:
  1570.  
  1571.       Drive [/Q] [/@EnVar]
  1572.  
  1573. Exit ErrorLevels:
  1574.  
  1575.       1 = A:, 2 = B:, etc.
  1576.  
  1577. The default drive is displayed.
  1578.  
  1579.  
  1580. ▒▒▒DriveExist  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1581.  
  1582. Determine if the requested drive letter is a valid DOS drive.
  1583.  
  1584. Command line format:
  1585.  
  1586.       DriveExist d:
  1587.  
  1588. Exit ErrorLevels:
  1589.  
  1590.       0 = Invalid
  1591.       1 = Valid
  1592.  
  1593. where "d:" corresponds to the drive to be tested.
  1594.  
  1595.  
  1596. ▒▒▒DriveID . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1597.  
  1598. Identify the type of drive specified.
  1599.  
  1600. Command line format:
  1601.  
  1602.       DriveID d: [/F|/P]
  1603.  
  1604. Exit ErrorLevels:
  1605.  
  1606.    Physical drive ID:
  1607.  
  1608.       0  = 320K/360K disk
  1609.       1  = 1.2M disk
  1610.       2  = 720K disk
  1611.       3  = Single-density 8-inch disk
  1612.       4  = Double-density 8-inch disk
  1613.       5  = Fixed disk
  1614.       6  = Tape drive
  1615.       7  = 1.44M disk
  1616.       8  = Read/write optical disk
  1617.       9  = 2.88M disk
  1618.       13 = RAM disk
  1619.       14 = CD-ROM
  1620.       15 = Unidentified
  1621.  
  1622.    Drive type flags (added to above):
  1623.  
  1624.       0   = Physical
  1625.       16  = SUBST
  1626.       32  = JOIN
  1627.       64  = Remote
  1628.       128 = Invalid
  1629.  
  1630.    Other:
  1631.  
  1632.       253 = /P specified on non-physical drive (no error message)
  1633.       254 = Invalid drive designation
  1634.       255 = Invalid DOS version
  1635.  
  1636. NOTE:  Uses undocumented information.
  1637.  
  1638. This command identifies the type of drive specified on the command
  1639. line by examining the DOS Current Directory Structure.  If the flags
  1640. identify the drive as a physical one, Interrupt 21H Function 44H
  1641. Subfunction 0DH is called to identify the drive type.
  1642.  
  1643. If the flags indicate a CD-ROM drive, the flag ErrorLevel is cleared
  1644. and the CD-ROM ErrorLevel is returned.  If the drive is unidentified,
  1645. and the RamDrive command tests are satisfied, the flag ErrorLevel is
  1646. cleared and the RamDrive ErrorLevel is returned.
  1647.  
  1648. The /F Flags switch returns an ErrorLevel according to the drive type
  1649. flags.  The /P Physical switch returns an ErrorLevel according to the
  1650. physical drive ID.  The /F switch overrides the /P switch if both are
  1651. specified.  With no switch specified, the drive type flag ErrorLevel
  1652. and physical drive ID ErrorLevels are additive.
  1653.  
  1654. NOTE:  There are quite a number of possible return ErrorLevels
  1655. depending on exactly what drive you test.  All ErrorLevels greater
  1656. than 127 indicate an  invalid drive.  This command requires DOS
  1657. version 5.0+.
  1658.  
  1659.  
  1660. ▒▒▒DriveReady  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1661.  
  1662. Determine if a drive is ready for access.
  1663.  
  1664. Command line format:
  1665.  
  1666.       DriveReady d:
  1667.  
  1668. Exit ErrorLevels:
  1669.  
  1670.       0 = Drive not ready
  1671.       1 = Drive ready
  1672.  
  1673. where "d:" corresponds to any single drive letter.  The DriveExist
  1674. command is called first.  The command then installs a replacement DOS
  1675. Critical Error Handler to trap the resultant error if the drive is not
  1676. ready when Interrupt 21H Function 1CH (Get Allocation Information for
  1677. Specific Drive) is executed.
  1678.  
  1679.  
  1680. ▒▒▒DriveSize . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1681.  
  1682. Determine the size of the specified or default drive.
  1683.  
  1684. Command line format:
  1685.  
  1686.       DriveSize [/Dn] [d:]
  1687.  
  1688. Exit ErrorLevels:
  1689.  
  1690.       0     = Invalid drive error
  1691.       1-255 = Blocks of space on the drive
  1692.  
  1693. where "d:" corresponds to the drive desired.  If the drive is omitted,
  1694. the default drive is used.  The command returns the number of full and
  1695. partial blocks on the drive.  The default block size is 100 kilobytes. 
  1696. A different block size may be specified with the /Dn switch.  The /Dn
  1697. switch "n" value for this command is measured in kilobytes.  If more
  1698. than 255 blocks are on the drive, the returned ErrorLevel will be 255.
  1699.  
  1700.  
  1701. ▒▒▒DriveSpace  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1702.  
  1703. Determine the amount of free disk space on the specified or default
  1704. drive.
  1705.  
  1706. Command line format:
  1707.  
  1708.       DriveSpace [/Dn] [d:]
  1709.  
  1710. Exit ErrorLevels:
  1711.  
  1712.       0     = No blocks available or invalid drive error
  1713.       1-255 = Blocks of space available
  1714.  
  1715. where "d:" corresponds to the drive desired.  If the drive is omitted,
  1716. the default drive is used.  The command returns the number of full
  1717. blocks available.  Partial blocks are ignored.  The default block size
  1718. is 100 kilobytes (102,400 bytes).  A different block size may be
  1719. specified with the /Dn switch.  The /Dn switch "n" value for this
  1720. command is measured in kilobytes.  If more than 255 blocks are
  1721. available, the returned ErrorLevel will be 255.
  1722.  
  1723.  
  1724. ▒▒▒DriveVolume . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1725.  
  1726. Determine if a particular disk volume exists on the named drive.
  1727.  
  1728. Command line format:
  1729.  
  1730.       DriveVolume [d:]VolumeName
  1731.  
  1732. Exit ErrorLevels:
  1733.  
  1734.       0 = Volume does not exist
  1735.       1 = Volume exists
  1736.  
  1737.  
  1738. ▒▒▒DS4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1739.  
  1740. Determine if a Toshiba portable computer is installed in a DeskStation
  1741. IV desk top unit.
  1742.  
  1743. Command line format:
  1744.  
  1745.       DS4
  1746.  
  1747. Exit ErrorLevels:
  1748.  
  1749.       0 = Not installed
  1750.       1 = Installed
  1751.  
  1752. NOTE:  Uses undocumented information.
  1753.  
  1754.  
  1755. ▒▒▒Echo  . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1756.  
  1757. Send a comment line to the screen.
  1758.  
  1759. Command line format:
  1760.  
  1761.       Echo [/C|/N] [String]
  1762.  
  1763. The /C switch is used to output a carriage return only at the end of
  1764. the String, returning the cursor to the first column for overwriting
  1765. the previous output.  The /N switch is used to eliminate the final
  1766. carriage return/line feed, leaving the cursor at the end of the String
  1767. just displayed.  /N takes precedence over /C if both are included. 
  1768. The /Q switch has no affect on this command.  Use Cecho to output text
  1769. in a specific color.  Used without String, Echo outputs a carriage
  1770. return/line feed sequence.
  1771.  
  1772. Since DOS capitalizes everything in CONFIG.SYS during its parsing
  1773. scan, a carat [^] is used as the default character to toggle between
  1774. upper and lower case for the displayed string.  If a carat is desired
  1775. on the displayed line, two carats [^^] should be used on the input
  1776. line.  This format character is in effect only during execution from
  1777. CONFIG.SYS.
  1778.  
  1779. A tilde [~] is the default character for insertion of a carriage
  1780. return/line feed sequence in the displayed line.  If a tilde is
  1781. desired on the displayed line, two tildes [~~] should be used on the
  1782. input line.  This format character is in effect at all times.
  1783.  
  1784. If String is preceded by a double quote ["], the double quote is
  1785. deleted but leading separators are not removed.
  1786.  
  1787. Example command lines:
  1788.  
  1789.       Echo       S^tart ^DEVICE ^section...~
  1790.       Echo "     S^tart ^DEVICE ^section...~
  1791.  
  1792. The first command line would display "Start DEVICE section..." with
  1793. two trailing carriage return/line feeds.  The second command line
  1794. would display "     Start DEVICE section..." with two trailing
  1795. carriage return/line feeds.
  1796.  
  1797.  
  1798. ▒▒▒EchoPause . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1799.  
  1800. Suspend execution after printing a prompt message on the screen that
  1801. is specified on the command line.
  1802.  
  1803. Command line format:
  1804.  
  1805.       EchoPause [/C|/N] [String]
  1806.  
  1807. Pressing any key resumes execution.  See the Echo command for String
  1808. formatting and switches.  Use KeyPause for optional pausing, Pause for
  1809. a standard pause message or WaitFor for timed pausing.
  1810.  
  1811.  
  1812. ▒▒▒EGA25 . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1813.  
  1814. Set a 25 line color EGA screen.
  1815.  
  1816. Command line format:
  1817.  
  1818.       EGA25 [/C]
  1819.  
  1820. Performs a mode 3 reset of the display adapter using Interrupt 10H
  1821. Function 0.  This works on EGA in a display independent way.  The /C
  1822. switch clears the screen after switching modes if ANSI is installed to
  1823. set the screen color.
  1824.  
  1825.  
  1826. ▒▒▒EGA43 . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  1827.  
  1828. Set a 43 line EGA screen.
  1829.  
  1830. Command line format:
  1831.  
  1832.       EGA43 [/C]
  1833.  
  1834. Forces the use of the display adapter's internal 8x8 font.  Interrupt
  1835. 10H Function 11H Subfunction 12H performs an adapter mode reset when
  1836. it executes.  This works on EGA in a display independent way.  The /C
  1837. switch clears the screen after switching modes if ANSI is installed to
  1838. set the screen color.
  1839.  
  1840. This command is in effect only for video modes 0-3.
  1841.  
  1842.  
  1843. ▒▒▒Env . . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1844.  
  1845. Determine size and use of the DOS master environment and manipulate
  1846. environment strings.
  1847.  
  1848. Command line format:
  1849.  
  1850.       Env SubCommandName [/Dn] [/1] [/2]
  1851. NOTE:  Uses undocumented information.  Environment variable names must
  1852. be in capital letters for the DOS SET command to use them.
  1853.  
  1854. This command performs several functions relating to the DOS
  1855. environment:  It either returns information about the DOS environment
  1856. or it manipulates the strings in that environment.  For information
  1857. SubCommands, results are returned via ErrorLevel.  For string
  1858. SubCommands, CFG manipulates the environment of either the master
  1859. command processor (default, /1) or, the parent command processor (/2).
  1860.  
  1861. The following are valid SubCommandNames:  Caps, Clear, Fill, Free,
  1862. Reset, Save, Set, Strings, Total, Used.  Each SubCommandName may be
  1863. abbreviated as desired.  The default block size for information
  1864. SubCommands is 16 bytes.  A different block size may be specified with
  1865. the /Dn switch.  The /Dn switch "n" value for this command is measured
  1866. in bytes.  The /Dn switch has no meaning for string SubCommands.  The
  1867. /2 switch will locate the environment of the parent program for
  1868. examination vice the master environment.  If CFG is executed under a
  1869. secondary command processor, use of this switch will determine the
  1870. characteristics of the environment available to any other program
  1871. executed under that secondary command processor.  It also provides an
  1872. alternate method of locating the master environment when CFG is
  1873. executed under the master command processor.
  1874.  
  1875. Caps:  Capitalizes the names of all environment variables.
  1876.  
  1877. Clear:  Removes *all* strings from the environment.  Use with EXTREME
  1878. CAUTION.
  1879.  
  1880. Fill:  Creates a series of environment strings named "CFGxxx" that
  1881. completely use all available environment space.  "xxx" is a decimal
  1882. number that ranges from 001 to as high as required.  This ensures that
  1883. any spawned command processors are created with an environment that
  1884. has the same size as the parent command processor.  Deleting these
  1885. strings (either with the Reset SubCommand or multiple DOS SET
  1886. commands) frees the environment space.  Each string uses a maximum of
  1887. 80 bytes.
  1888.  
  1889. Free:  Reports the number of blocks of space available for use.  This
  1890. is equal to Total minus Used.
  1891.  
  1892. Reset:  Removes the strings created by the Fill SubCommand.  These
  1893. strings may also be removed using DOS SET commands.  This command may
  1894. take several seconds on very large environments.  This command
  1895. searches for the CFG001 variable and deletes all further sequential
  1896. variables it finds.
  1897.  
  1898. Save [FileName]:  Copies the strings from the designated environment
  1899. preceded by "@SET " or "SET ", as appropriate.  If the optional
  1900. FileName is present, the strings are written to it.  Otherwise, they
  1901. are written to DOS StdOut.  Only one environment (/1 or /2) should be
  1902. specified.
  1903.  
  1904. Set /@EnVar String:  The /@EnVar switch is required.  The String which
  1905. follows is placed in the environment.  Environment variables in String
  1906. are not processed by CFG, but by DOS prior to passing the command line
  1907. to CFG.  If String is preceded by a double quote ["], the double quote
  1908. is deleted but leading separators are not removed.
  1909.  
  1910. Strings:  Reports the number of strings currently defined in the
  1911. environment.  This option has a unchangeable /Dn switch value of 1.
  1912.  
  1913. Total:  Reports the number of blocks of space in the environment. 
  1914. Because of the way DOS allocates memory, the size in bytes will always
  1915. be a multiple of 16.
  1916.  
  1917. Used:  Reports the total number of blocks of space currently in use. 
  1918. This will be dependent on the number and length of existing
  1919. environment variables.  This value includes the null bytes that
  1920. terminate each string.
  1921.  
  1922.  
  1923. ▒▒▒ErrorLevel  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1924.  
  1925. Return a DOS ErrorLevel equal to the number on the command line.
  1926.  
  1927. Command line format:
  1928.  
  1929.       ErrorLevel n
  1930.  
  1931. where "n" is a number between 0 and 255.  Numbers greater than 255
  1932. return 255.  Non-numbers return 0.
  1933.  
  1934.  
  1935. ▒▒▒FileDir ▒▒▒FileDrive ▒▒▒FileExt ▒▒▒FileName . . . . . . . . [BATCH]
  1936.  
  1937. Returns the requested portion of the given file name string.
  1938.  
  1939. Command line format:
  1940.  
  1941.       FileDir Filename [/Q] [/@EnVar]
  1942.       FileDrive Filename [/Q] [/@EnVar]
  1943.       FileExt Filename [/Q] [/@EnVar]
  1944.       FileName Filename [/Q] [/@EnVar]
  1945.  
  1946. FileDir, FileDrive, FileExt and FileName are a group of related
  1947. commands that separate out portions of a supplied file name string. 
  1948. This is best shown by example.  Suppose CFG.COM exists in the current
  1949. directory of C:\CFG.  The above commands will return the following
  1950. values given a command line of "CFG CommandName CFG.COM":
  1951.  
  1952.       FileDir           \CFG
  1953.       FileDrive         C:
  1954.       FileExt           COM
  1955.       FileName          CFG
  1956.  
  1957. CFG uses DOS Interrupt 21H Function 60H to canonicalize the supplied
  1958. path.  FileDir is almost the same as the Dir command except that you
  1959. can specify other than the current directory, if desired.
  1960.  
  1961.  
  1962. ▒▒▒FileDTC   . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  1963.  
  1964. Compare the date and time stamps of two files.
  1965.  
  1966. Command line format:
  1967.  
  1968.       FileDTC [d:][path]File1 [d:][path]File2
  1969.  
  1970. Exit ErrorLevels:
  1971.  
  1972.       0 = Command line error
  1973.       1 = File1 is older than File2
  1974.       2 = (Date1 = Date2) and (Time1 = Time2)
  1975.       3 = File2 DOS error on opening
  1976.       4 = File1 DOS error on opening
  1977.       5 = (Date1 = Date2) but Time2 is older than Time1
  1978.       6 = Date2 is older than Date1
  1979.  
  1980. FileDTC (File Date Time Compare) compares the date and time stamps of
  1981. two files.  FileDTC does not accept wildcards in the file names.  An
  1982. ErrorLevel of 4 or higher indicates that File2 either does not exist
  1983. or is older than File1.  An error message is displayed if either file
  1984. cannot be found.
  1985.  
  1986. FileDTC can be used as follows:
  1987.  
  1988.  IfCopy.Bat
  1989.  ──────────
  1990.    @Echo Off
  1991.    If [%1]==[...] GoTo 1
  1992.    If [%2]==[] GoTo End
  1993.    For %%A In (%1) Do Call IfCopy ... %%A %2
  1994.    GoTo End
  1995.  :1
  1996.    CFG FileDTC %2 %3%2
  1997.    If ErrorLevel 4 GoTo End
  1998.    Copy %2 %3%2 >Nul
  1999.  :End
  2000.  
  2001. Issuing "IfCopy *.* A:" will copy all files from the current directory
  2002. to the A: drive that are older than those on the A: drive or do not
  2003. exist.  This is a little more discriminating than Xcopy /d since it
  2004. also compares times.
  2005.  
  2006.  
  2007. ▒▒▒FileExist . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2008.  
  2009. Determine if the specified file exists.
  2010.  
  2011. Command line format:
  2012.  
  2013.       FileExist [d:][path]FileName
  2014.  
  2015. Exit ErrorLevels:
  2016.  
  2017.       0 = File does not exist
  2018.       1 = File exists
  2019.  
  2020. This command is similar to the DOS "IF EXIST" batch file command.
  2021.  
  2022.  
  2023. ▒▒▒FileLines . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2024.  
  2025. Determine the number of lines (records) in the specified file.
  2026.  
  2027. Command line format:
  2028.  
  2029.       FileLines [d:][path]Filename [/Dn]
  2030.  
  2031. Exit ErrorLevels:
  2032.  
  2033.       0    = Zero length file or file error
  2034.       Else = Number of lines
  2035.  
  2036. This command counts the number of lines or records in an ASCII file by
  2037. searching for carriage return characters (ASCII 013).  The last line
  2038. of a file will be counted even if it does not end in a carriage
  2039. return/line feed sequence.  A line which ends a file and does end with
  2040. a carriage return/line feed will not count as an additional line.
  2041. This command has a /Dn block size of one, but I count using 32-bits
  2042. (just in case).
  2043.  
  2044.  
  2045. ▒▒▒Files . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2046.  
  2047. Determine size and use of the DOS System File Table.
  2048.  
  2049. Command line format:
  2050.  
  2051.       Files SubCommandName
  2052.  
  2053. NOTE:  Uses undocumented information.
  2054.  
  2055. This command returns information about the DOS System File Table (SFT)
  2056. that is created through the FILES command in CONFIG.SYS as well as
  2057. third party extenders.  All information is returned via ErrorLevel. 
  2058. The following are valid SubCommandNames:  Blocks, Free, Margin,
  2059. Orphan, Previous, Total, Used.  Each SubCommandName may be abbreviated
  2060. as desired.  This command requires DOS 3.0+.
  2061.  
  2062. Blocks:  Number of blocks the SFT is divided into.  A large number of
  2063. blocks has little effect on performance, but may use up extra memory.
  2064.  
  2065. Free:  Number of entries available for use.  This is equal to Total
  2066. minus Used.
  2067.  
  2068. Margin:  Minimum margin that existed at the "high water mark" of
  2069. previous use.  This is equal to Total minus Previous.  This value is
  2070. how close the system has gotten to a DOS file error due to no more
  2071. file handles being available.
  2072.  
  2073. Orphan: Number of entries that are orphaned, typically by redirecting
  2074. the output of a resident program to the NUL device during
  2075. installation.  This number is a subset of the Used files.
  2076.  
  2077. Previous: Maximum number of files that had previously been open at any
  2078. one time since the computer was last booted.  Since DOS reuses entries
  2079. after they have been closed, this value may be looked at as the "high
  2080. water mark" of SFT use.
  2081.  
  2082. Total:  All entries available in the SFT, including any that may have
  2083. been created by later programs such as Qemm's FILES or PC Magazine's
  2084. UMBFILES.
  2085.  
  2086. Used:  Number of entries currently in use.  Typically, this will be 3
  2087. unless files have been orphaned or Windows is running.
  2088.  
  2089.  
  2090. ▒▒▒FileSize  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2091.  
  2092. Determine the size of the specified file.
  2093.  
  2094. Command line format:
  2095.  
  2096.       FileSize [/Dn] [d:][path]Filename
  2097.  
  2098. Exit ErrorLevels:
  2099.  
  2100.       0     = File error
  2101.       1-255 = Blocks of the file
  2102.  
  2103. The command returns the number of full and partial blocks in the file. 
  2104. The default block size is 1024 bytes (1 kilobyte).  A different block  size may be specified with the /Dn switch.  The /Dn switch "n" value
  2105. for this command is measured in bytes.  If more than 255 blocks are in
  2106. the file, the returned ErrorLevel will be 255.  An error message is
  2107. displayed if the file cannot be found.
  2108.  
  2109.  
  2110. ▒▒▒FileText  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2111.  
  2112. Determine if the Text string exists in the specified file.
  2113.  
  2114. Command line format:
  2115.  
  2116.       FileText [d:][path]Filename [/C] "String"
  2117.  
  2118. Exit ErrorLevels:
  2119.  
  2120.       0 = String not present
  2121.       1 = String present
  2122.  
  2123. This command performs a case sensitive search of the designated file
  2124. for the text string.  If the /C Case switch is used, a case
  2125. insensitive search is performed.  An error message is displayed if the
  2126. file cannot be found.
  2127.  
  2128.  
  2129. ▒▒▒GamePort  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2130.  
  2131. Determine if a game port is installed.
  2132.  
  2133. Command line format:
  2134.  
  2135.       GamePort [/Q]
  2136.  
  2137. Exit ErrorLevels:
  2138.  
  2139.       0 = Game port not installed
  2140.       1 = Game port installed
  2141.  
  2142. A message is displayed with the results.
  2143.  
  2144.  
  2145. ▒▒▒GetKey  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2146.  
  2147. Get any keyboard input or limit the allowed keys to those specified on
  2148. the command line.
  2149.  
  2150. Command line format:
  2151.  
  2152.       GetKey [/C] [/F] [/S] ["String"] [Al] [Cl] [D[:]t,p] [E] [Fn]
  2153.              [Sn] [m]
  2154.  
  2155. Exit ErrorLevels:
  2156.  
  2157.       With list    = Position of key n lit (1, 2, 3, etc.)
  2158.       Without list = Scan code of key pressed
  2159.       255          = Ctrl-Break/Ctrl-C pressed (if not specified)
  2160.  
  2161. where:
  2162.  
  2163.       /C - Comparison of characters in "String" is case sensitive.
  2164.       /F - Flushes the keyboard buffer prior to execution.
  2165.       /S - Causes the key pressed to be shown on screen.
  2166.  
  2167. These options may be placed in any order after the CommandName:
  2168.  
  2169.       "String" is a series of characters representing valid keyboard
  2170.          input.
  2171.          String must be enclosed in either single or double quotes.
  2172.       "Al" and "Cl" are Alt-letter and Ctrl-letter combinations.
  2173.       "D:t,p" represents a delay time "t" and default key position "p"
  2174.          to return if no choice is made after "t" seconds.  "t" can be
  2175.          between 1 and 3640.  "p" cannot exceed the length of the
  2176.          provided list plus one.
  2177.          The "list plus one" option allows the detection of no choice.
  2178.       "E" is the Escape key.
  2179.       "Fn" are function keys F1 through F12.  F0 represents the Return
  2180.          or Enter key.  Multiple function keys must be separated.
  2181.       "Sn" adds (shifts) "n" to the returned ErrorLevel.  This allows
  2182.          testing of multi-layered menus in one pass.  The maximum
  2183.          value is 254.  This option may be placed anywhere after the
  2184.          CommandName.
  2185.       "m" is direct keyboard scan codes.
  2186.  
  2187. There may be multiple occurrences of "String" on the input line.  The
  2188. number of input keys is only limited by DOS command line length.
  2189.  
  2190. Used without options, GetKey returns the scan code of the key that was
  2191. pressed.  GetKey's optional key list provides much greater
  2192. functionality.  If you supply the optional "String" or other arguments
  2193. to GetKey, CFG will wait either until one of those keys listed has
  2194. been pressed or until you break out of the command with Ctrl-Break or
  2195. Ctrl-C.  All other keypresses are ignored.  A time limit may be
  2196. specified using the "D:t,p" option.  If no "p" option is specified, 1
  2197. is used.  By default, the GetKey command is not case sensitive (i.e.
  2198. if either "Y" or "y" is pressed, the ErrorLevel will be the same)
  2199. unless the /C switch is used.  If you want the single quote included
  2200. as a valid keypress, enclose it in double quotes and vice versa. 
  2201. Standard separators between the listed keys are parsed out.
  2202.  
  2203. Example command line:
  2204.  
  2205.       GetKey "yn" F1 F2 F0 AC CC E "abc"
  2206.  
  2207. If F1 is now pressed, the returned ErrorLevel will be 3, since F1 is
  2208. the third entry in the list.  Ctrl-C will return 7 in this case vice
  2209. 255 since it is specified on the command line.
  2210.  
  2211.  
  2212. ▒▒▒Help  . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2213.  
  2214. Display program scrollable help.
  2215.  
  2216. Command line format:
  2217.  
  2218.       Help [String]
  2219.  
  2220. Without the optional String, this command is the same as using the /?
  2221. switch and displays the CFG.HLP file.  With any String on the command
  2222. line, CFG.DOC is loaded and scanned (case insensitive) until String is
  2223. found preceded by "▒▒▒".  Command headers are formatted thus.
  2224.  
  2225. CFG.DOC and CFG.HLP must be in the same directory as the CFG.COM in
  2226. order to be found.  This command is not available in MultiCommand
  2227. mode.
  2228.  
  2229.  
  2230. ▒▒▒IACAfill  . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  2231.  
  2232. Write up to 16 bytes to the Inter-Application Communication Area
  2233. (IACA) for communication between CONFIG.SYS and AUTOEXEC.BAT.
  2234.  
  2235. Command line format:
  2236.  
  2237.       IACAfill String [/O]
  2238.  
  2239. There are 16 bytes at address 0040:00F0 called the IACA.  These bytes
  2240. can be modified by any program, but few applications actually use them
  2241. since they are subject to change by any program and do not provide
  2242. much storage.
  2243.  
  2244. The IACAfill command moves the command line String to the IACA.  The
  2245. String must be a single word.  A space or carriage return will end the
  2246. transfer.  The /O Overwrite switch will unconditionally overwrite
  2247. anything in the IACA.  By default, IACAfill will not overwrite. 
  2248. IACAfill fills the unused part of the IACA with ASCII zeroes.
  2249.  
  2250. IACAfill allows communication between CONFIG.SYS and AUTOEXEC.BAT on
  2251. pre-DOS 6.0 systems.  When managing multiple configurations, this will
  2252. allow you to set a variable in each separate CONFIG.SYS file for
  2253. appropriate action in AUTOEXEC.BAT.  Use the IACAread command to read
  2254. the string from the IACA.
  2255.  
  2256. Example command line:
  2257.  
  2258.       IACAfill 386Max
  2259.  
  2260. This will store "386MAX" in the IACA.
  2261.  
  2262.  
  2263. ▒▒▒IACAread  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2264.  
  2265. Reads up to 16 bytes from the Inter-Application Communication Area.
  2266.  
  2267. Command line format:
  2268.  
  2269.       IACAread [/Q] [/@EnVar] [/C] [String]
  2270.  
  2271. Exit ErrorLevels:
  2272.  
  2273.       0 = No errors encountered
  2274.       1 = No string present in the IACA
  2275.  
  2276. String may be any combination of characters that are desired to
  2277. precede the string read from the IACA.  The /C switch causes the old
  2278. data to be cleared from the IACA.  An error message will be displayed
  2279. if there is no string in the IACA.
  2280.  
  2281. IACAread first checks the IACA for a string.  It then scans its
  2282. command line and writes anything it finds there and then writes the
  2283. IACA.  The IACA is not cleared after reading unless the /C switch is
  2284. used.
  2285.  
  2286. Example command use:
  2287.  
  2288.    CFG IACAread @SET EnVar=>%TEMP%\IACA.BAT
  2289.    CALL %TEMP%\IACA.BAT
  2290.    DEL %TEMP%\IACA.BAT
  2291.  
  2292. where EnVar is the name of the environment variable to be set.  This
  2293. will write "@SET EnVar=String" to DOS StdOut.  Using CFG's ability (as
  2294. of version 2.2) to write directly to the master environment, the above
  2295. can be shortened to:
  2296.  
  2297.    CFG IACAread /Q /@EnVar
  2298.  
  2299. If the SET command in the example IACA.BAT file does not work, you
  2300. should have received an "Out of environment space" error from DOS
  2301. during execution.  Check the free environment space using the Env Free
  2302. command.  Environment space may be increased by placing a larger
  2303. number after the /E: switch on the CONFIG.SYS SHELL line or adding
  2304. such a line with a /E: switch to the file if none exists and
  2305. rebooting.  See the sample CONFIG.SYS file below.
  2306.  
  2307.  
  2308. ▒▒▒Input . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2309.  
  2310. Get a line of input.
  2311.  
  2312. Command line format:
  2313.  
  2314.       Input [/Q] [/@EnVar]
  2315.  
  2316. This command uses DOS Interrupt 21H Function 0AH (Buffered Input) to
  2317. get a string from the user.  This string may be stored in the
  2318. environment using the /@EnVar switch.  If /Q is used, the cursor
  2319. remains at the left most screen column.  If /Q is not used, the cursor
  2320. is left at the end of the input line.  The maximum length line
  2321. accepted is 254 characters.
  2322.  
  2323.  
  2324. ▒▒▒Intense . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2325.  
  2326. Enable intense background colors.
  2327.  
  2328. Command line format:
  2329.  
  2330.       Intense
  2331.  
  2332. Interrupt 10H Function 10H Subfunction 3 is used to enable intense
  2333. background colors on EGA and above.  Any blinking characters will stop
  2334. blinking and have intense backgrounds.
  2335.  
  2336.  
  2337. ▒▒▒KeyBoard  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2338.  
  2339. Determine if an enhanced or standard keyboard is installed.
  2340.  
  2341. Command line format:
  2342.  
  2343.       KeyBoard
  2344.  
  2345. Exit ErrorLevels:
  2346.  
  2347.       0 = Standard keyboard is installed
  2348.       1 = Enhanced keyboard is installed
  2349.  
  2350. This command checks the keyboard status byte at 0040:0096 to see if
  2351. bit 4 is set.  If it is, an enhanced keyboard is assumed to be
  2352. attached to the system.
  2353.  
  2354.  
  2355. ▒▒▒KeyBuffer . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2356.  
  2357. Adjust the DOS default keyboard buffer between 2 and 16 characters.
  2358.  
  2359. Command line format:
  2360.  
  2361.       KeyBuffer SubCommandName
  2362.  
  2363. Exit ErrorLevels:
  2364.  
  2365.       0    = Parsing error
  2366.       Else = Number of bytes (with Set or Status)
  2367.       Else = Number of blocks (with Status /Dn)
  2368.  
  2369. This command changes the size of the available DOS keyboard buffer. 
  2370. The following are valid SubCommandNames:  Set, Status.  Each
  2371. SubCommandName may be abbreviated as desired.
  2372.  
  2373. Set n:  Requires a value for the new size.  Valid numbers for "n"
  2374. range between 2 and 16.
  2375.  
  2376. Status [/Dn]:  Returns the current buffer size in blocks as an
  2377. ErrorLevel even if the buffer has been relocated.  The default block
  2378. size is 1 byte.  A different block size may be specified with the /Dn
  2379. switch.  The /Dn switch "n" value for this command is measured in
  2380. bytes and has meaning only with this SubCommand.
  2381.  
  2382. An error is displayed if the keyboard buffer has been shifted from the
  2383. DOS default location.  This command is intended for a young typist who
  2384. may improperly hit multiple keys to force an early keyboard buffer
  2385. full beep from the BIOS.
  2386.  
  2387.  
  2388. ▒▒▒KeyFlush  . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2389.  
  2390. Flush any waiting keys from the keyboard buffer.
  2391.  
  2392. Command line format:
  2393.  
  2394.       KeyFlush
  2395.  
  2396. This command checks for available keys and repeatedly reads the
  2397. keyboard until they are all cleared from the keyboard buffer.
  2398.  
  2399.  
  2400. ▒▒▒KeyPause  . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2401.  
  2402. Suspend execution if any of the Shift, Alt or Ctrl keys are pressed.
  2403.  
  2404. Command line format:
  2405.  
  2406.       KeyPause
  2407.  
  2408. Exit ErrorLevels:
  2409.  
  2410.       0 = Pause not executed
  2411.       1 = Pause executed
  2412.  
  2413. One of the shift keys must be held down before program execution. 
  2414. Execution resumes once the key is released.  Use EchoPause to display
  2415. a customized pause message, Pause for a standard pause message or
  2416. WaitFor for timed pausing.
  2417.  
  2418.  
  2419. ▒▒▒KeyPress  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2420.  
  2421. Determine if there is a key waiting in the keyboard buffer.
  2422.  
  2423. Command line format:
  2424.  
  2425.       KeyPress
  2426.  
  2427. Exit ErrorLevels:
  2428.  
  2429.       0 = No keys available
  2430.       1 = Keys are available
  2431.  
  2432.  
  2433. ▒▒▒KeyStuff  . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2434.  
  2435. Place the command line characters into the BIOS keyboard buffer.
  2436.  
  2437. Command line format:
  2438.  
  2439.       KeyStuff String
  2440.  
  2441. Exit ErrorLevels:
  2442.  
  2443.       0    = No characters inserted
  2444.       Else = Number of characters inserted
  2445.  
  2446. The characters appearing after the CommandName are placed in the
  2447. buffer.  Leading spaces are parsed off.  No maximum buffer length or
  2448. location is assumed.  The command will place one less than the full
  2449. buffer of characters into the buffer, preventing CFG from interfering
  2450. with the BIOS buffer logic.
  2451.  
  2452.  
  2453. ▒▒▒LastBoot  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2454.  
  2455. Determine how the system was last booted.
  2456.  
  2457. Command line format:
  2458.  
  2459.       LastBoot
  2460.  
  2461. Exit ErrorLevels:
  2462.  
  2463.       0 = Cold boot (Flag value = 0000H)
  2464.       1 = Warm boot (Flag value = Else)
  2465.       2 = Warm boot (Flag value = 1200H)
  2466.       3 = Warm boot (Flag value = 1234H)
  2467.  
  2468. The command examines the BIOS boot flag at 0040:0072 to determine the
  2469. method of the last system boot.  A flag value of zero is assumed to be
  2470. a cold boot.  The normal flag value for a warm boot is 1234H.  Some
  2471. BIOS versions overwrite the lower byte of this with a zero, resulting
  2472. in a flag value of 1200H for a warm boot.  Any other non-zero flag
  2473. value is also identified and assumed to be a warm boot.
  2474.  
  2475.  
  2476. ▒▒▒LastDrive . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2477.  
  2478. Determine letter of last available drive.
  2479.  
  2480. Command line format:
  2481.  
  2482.       LastDrive [/Q] [/@EnVar]
  2483. Exit ErrorLevels:
  2484.  
  2485.       0-255 = Drive number (A = 0)
  2486.  
  2487. NOTE:  Uses undocumented information.
  2488.  
  2489. The lowest value this command can return is E:.
  2490.  
  2491.  
  2492. ▒▒▒Left  . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2493.  
  2494. Return the left most "n" characters from String.
  2495.  
  2496. Command line format:
  2497.  
  2498.       Left n String [/Q] [/@EnVar] [/C]
  2499.  
  2500. where "n" is a decimal number indicating the number of characters to
  2501. return from String, counting from the left.  The /C switch capitalizes
  2502. the returned string.
  2503.  
  2504.  
  2505. ▒▒▒Length  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2506.  
  2507. Return the length of the input String.
  2508.  
  2509. Command line format:
  2510.  
  2511.       Length String [/Q] [/@EnVar]
  2512.  
  2513. If String is preceded by a double quote ["], the double quote is
  2514. deleted but leading separators are not removed.
  2515.  
  2516.  
  2517. ▒▒▒Locate  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2518.  
  2519. Set cursor position on active video page.
  2520.  
  2521. Command line format:
  2522.  
  2523.       Locate r c
  2524.  
  2525. Exit ErrorLevels:
  2526.  
  2527.       0   = No errors
  2528.       255 = Input parsing error
  2529.  
  2530. where "r" corresponds to the row number and "c" corresponds to the
  2531. column number.  The top row is row 1.  The furthest left column is
  2532. column 1.  Decimal numbers are required.
  2533.  
  2534.  
  2535. ▒▒▒Lock  . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2536.  
  2537. Locks up the system after optionally displaying a fake error message.
  2538.  
  2539. Command line format:
  2540.  
  2541.       Lock [SubCommandName] [/C]
  2542.  
  2543. CAUTION:  This command requires a system reset after execution.
  2544.  
  2545. The following are valid SubCommandNames:  Disk, Net, None, Stack,
  2546. System.  Each SubCommandName may be abbreviated as desired.  No actual
  2547. error occurs.  The /C ColdBoot switch requires a hardware reset.  This
  2548. command is Windows-aware if the /C switch is used.
  2549.  
  2550. Disk:  Displays "Not ready reading drive C; Abort, Retry, Fail?".
  2551.  
  2552. Net:  Displays "Error accessing network".
  2553.  
  2554. None:  Displays nothing.  Default if SubCommandName is omitted.
  2555.  
  2556. Stack:  Displays "Internal stack overflow; System halted".
  2557.  
  2558. System:  Displays "Internal error; System halted".
  2559.  
  2560.  
  2561. ▒▒▒Lower . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2562.  
  2563. Return String all in lower case.
  2564.  
  2565. Command line format:
  2566.  
  2567.       Lower String [/Q] [/@EnVar]
  2568.  
  2569. If String starts with a double quote ["], the double quote is deleted
  2570. but leading separators are not removed.
  2571.  
  2572.  
  2573. ▒▒▒LptHide . . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  2574.  
  2575. Hide and restore the printer port base addresses.
  2576.  
  2577. Command line format:
  2578.  
  2579.       LptHide SubCommandName
  2580.  
  2581. The following are valid SubCommandNames: Hide, Restore.  Each
  2582. SubCommandName may be abbreviated as desired.  Error messages are
  2583. displayed if the routine fails.
  2584.  
  2585. LptHide hides the printer port base addresses by copying them to
  2586. another location in memory when the Hide command is used.  On
  2587. restoration with the Restore command, LptHide verifies the signature
  2588. and checksum stored with the port addresses to ensure that they were
  2589. not accidently over-written during RCD.SYS execution.  LptHide then
  2590. copies the base addresses back to their normal location.
  2591.  
  2592. Example command sequence:
  2593.  
  2594.       CFG.COM LptHide Hide
  2595.       RCD.SYS /M0
  2596.       CFG.COM LptHide Restore
  2597.  
  2598. The specific program this was written for is the Iomega Bernoulli Box
  2599. RCD.SYS driver, though it may be useful at other times.  During
  2600. RCD.SYS execution, it interrogates the printer ports to determine if
  2601. there are any parallel port Bernoulli Boxes installed.  Unfortunately,
  2602. some printers respond to this interrogation by printing the
  2603. interrogation sequence.
  2604.  
  2605. The default location for the hidden data is 7000:0000 for DOS versions
  2606. before 5.0.  This is below the 512 KB boundary in the event that the
  2607. machine only has that much base memory available, and high enough to
  2608. keep it from being over-written during execution of other device
  2609. drivers while the data is hidden.  For DOS Version 5.0+, the location
  2610. will vary depending on what the SysInit loader module reports as the
  2611. maximum available memory in the device driver header.  This prevents  interference with the larger memory requirements in the upper areas
  2612. around the 640 KB point that can occur under DOS 6.0+ with large
  2613. multiple-configuration CONFIG.SYS files.
  2614.  
  2615.  
  2616. ▒▒▒LptSet  . . . . . . . . . . . . . . . . . . . . . .  [BATCH/CONFIG]
  2617.  
  2618. Sets the parallel port base addresses to a default or specified value.
  2619.  
  2620. Command line format:
  2621.  
  2622.       LptSet a [b]
  2623.  
  2624. Where "a" corresponds to the desired port base address to set: 1, 2 or
  2625. 3.  The "b" corresponds to an optional hexadecimal value to set the
  2626. port base address to.  No checking is performed to warn of values
  2627. being overwritten.  Use this command carefully.
  2628.  
  2629. This command places a default port base address value (or the
  2630. specified value) in the appropriate location in the low memory DOS
  2631. data area.  The default values used for the ports are 3BCH, 378H and
  2632. 278H.  If your system uses different values, you must specify them as
  2633. "b" on the command line.
  2634.  
  2635. You can set multiple base addresses to the same value to access the
  2636. same physical port using different DOS port names.  The IRQ associated
  2637. with a specific parallel port has no impact since they are generally
  2638. all the same.
  2639.  
  2640.  
  2641. ▒▒▒LptSwap . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2642.  
  2643. Swap the printer base port addresses for the two printer ports
  2644. specified.
  2645.  
  2646. Command line format:
  2647.  
  2648.       LptSwap a b
  2649.  
  2650. where "a" and "b" are the numbers of the printer ports to be swapped. 
  2651. Valid numbers are 1, 2 and 3.  An error message will be given if one
  2652. of the ports is missing or invalid.
  2653.  
  2654. LptSwap switches the two ports as far as DOS is concerned.  This is
  2655. useful if you need to shift the printer ports around and are loading a
  2656. software print buffer as a device driver.  The contents of the port
  2657. addresses are not checked during the swap.
  2658.  
  2659. Example command line:
  2660.  
  2661.       LptSwap 1 3
  2662.  
  2663.  
  2664. ▒▒▒MachineName . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2665.  
  2666. Determine the network machine name.
  2667.  
  2668. Command line format:
  2669.  
  2670.       MachineName [/Q] [/@EnVar]
  2671.  
  2672. This command will display a name only if network software is loaded. 
  2673. This command requires DOS version 3.1 or higher.
  2674.  
  2675. ▒▒▒Memory  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2676.  
  2677. Determine amount of memory available.
  2678.  
  2679. Command line format:
  2680.  
  2681.       Memory SubCommandName [k] [/Dn] [/Q] [/@EnVar]
  2682.  
  2683. Exit ErrorLevels:
  2684.  
  2685.       With "k" specified
  2686.       ──────────────────
  2687.       0 = Requested amount of memory is not available or format error
  2688.       1 = Requested amount of memory is available
  2689.  
  2690.       Without "k" specified
  2691.       ─────────────────────
  2692.       0     = Requested memory is not available or format error
  2693.       Other = Number of blocks of memory available
  2694.  
  2695. where "k" is the number of kilobytes required.  Valid SubCommandNames
  2696. are: Base, Extended, Expanded, High, Main, UMB.  Each SubCommandName
  2697. may be abbreviated as desired, but must be unique.  A screen report is
  2698. made (unless /Q is used) and the exit ErrorLevel is set to the number
  2699. of blocks of available memory.  The /Dn switch "n" value for this
  2700. command is measured in kilobytes.  The /@EnVar switch will place the
  2701. total number of kilobytes in the desired environment variable.  CFG
  2702. scans the command line for a decimal number after the SubCommandName. 
  2703. This number is compared to the number of available kilobytes of the
  2704. requested type of memory.
  2705.  
  2706. Base Memory:  CFG executes BIOS Interrupt 12H to get the among of
  2707. contiguous memory installed in the system.  The default block size is
  2708. 16 kilobytes.
  2709.  
  2710. Extended Memory:  CFG checks for the presence of an XMS driver and
  2711. calls it if present.  Interrupt 15H Function 88H is used otherwise. 
  2712. The default block size is 64 kilobytes.
  2713.  
  2714. Expanded Memory:  CFG checks for the presence of an EMS driver and
  2715. then executes Interrupt 67H Function 42H to get the number of free
  2716. expanded memory pages.  The pages are converted to kilobytes for
  2717. reporting.  The default block size is 64 kilobytes.
  2718.  
  2719. High Memory:  Under DOS version 5.0 or higher, CFG uses Interrupt 2FH
  2720. Function 4AH Subfunction 01H to query free space in the High Memory
  2721. Area.  The default block size is 1 kilobyte.
  2722.  
  2723. Main Memory:  CFG calculates available memory based on the location of
  2724. its PSP and Interrupt 12H.  The default block size is 16 kilobytes.
  2725.  
  2726. UMB Memory:  Under DOS version 5.0 and higher, CFG attempts to link
  2727. the UMB chain with the low DOS memory chain to determine the largest
  2728. free available block.  If this fails or an earlier DOS version is in
  2729. use, the XMS provider is queried, if present.  The default block size
  2730. is 1 kilobyte.
  2731.  
  2732. Example command lines:
  2733.  
  2734.       CFG Memory M 512        --- Test for 512 KB main memory
  2735.       CFG Memory Exp 2048     --- Test for 2 MB expanded memory
  2736.       CFG Memory Base /D64    --- Base memory in 64 KB blocks
  2737.  
  2738. ▒▒▒Mid . . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2739.  
  2740. Return "n" characters from String starting at position "m".
  2741.  
  2742. Command line format:
  2743.  
  2744.       Mid m n String [/Q] [/@EnVar] [/C]
  2745.  
  2746. where "m" and "n" are decimal numbers.  "m" is the starting position
  2747. and "n" is the number of characters to return.  The first letter of
  2748. String is position 1.  If "m" is zero or past the end of String,
  2749. nothing is returned.  "n" may extend past the end of the line without
  2750. an error.  The /C switch capitalizes the returned string.
  2751.  
  2752.  
  2753. ▒▒▒Mono  . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2754.  
  2755. Set a 25 line monochrome screen.
  2756.  
  2757. Command line format:
  2758.  
  2759.       Mono
  2760.  
  2761. Performs a mode 7 reset of the display adapter using Interrupt 10H
  2762. Function 0.  This works in a display independent way.  Use this
  2763. command only if a monochrome monitor is installed.
  2764.  
  2765.  
  2766. ▒▒▒Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2767.  
  2768. Determine if a mouse is present and reset both software and hardware
  2769. for it.
  2770.  
  2771. Command line format:
  2772.  
  2773.       Mouse
  2774.  
  2775. Exit ErrorLevels:
  2776.  
  2777.       0    = Either hardware or driver are not installed
  2778.       Else = Installed (number of buttons)
  2779.  
  2780. Performs an Interrupt 33H Function 0 reset to get the driver status. 
  2781. This command requires DOS version 3.0 or higher.
  2782.  
  2783.  
  2784. ▒▒▒Now   . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2785.  
  2786. Display the current date.
  2787.  
  2788. Command line format:
  2789.  
  2790.       Now DateFormat [/Q] [/@EnVar]
  2791.  
  2792. where the DateFormat characters are given below.  This format is an
  2793. extended version of that used in WordPerfect.  Non-number characters
  2794. are transferred directly.  The string is displayed using the current
  2795. colors.
  2796.  
  2797. Character   Meaning
  2798. ─────────   ───────────────────────────────────────────────────────
  2799.     1       Day of the Month
  2800.     2       Month (number)
  2801.     3       Month (word)
  2802.     4       Year (all four digits)
  2803.     5       Year (last two digits)
  2804.     6       Day of the Week (word)
  2805.     7       Hour (24-hour clock)
  2806.     8       Hour (12-hour clock)
  2807.     9       Minute
  2808.    %$ ────┬ Used before a number will:
  2809.           │   Pad numbers < 10 with a leading zero (%) or space ($).
  2810.           └   Either will abbreviate the month or day of the week.
  2811.     # ───── Used before a number will display that number.
  2812. &1 &2 &3 ─┬ Insert country specific string separators.  See Country
  2813. &4 &5 &9  └   command for the string inserted.
  2814.  
  2815. Examples (USA):
  2816.             3 1, 4       = December 25, 1984
  2817.             %6 %3 1,4    = Tue Dec 25, 1984
  2818.             %2/%1/5 (6)  = 01/01/85 (Tuesday)
  2819.             $2/$1/5 (%6) =  1/ 1/85 (Tue)
  2820.             8&590        = 10:55am
  2821.  
  2822. If you desire to change the Day of Week and Month strings used in the
  2823. Now command to another language, you may do so by using DEBUG or a
  2824. disk editor and changing them manually.  If you use DEBUG, rename the
  2825. CFG executable to CFG.XXX and load the file as normal.  This is
  2826. required since CFG is now in EXE format.  One caution:  CFG expects
  2827. the strings to be terminated with an ASCII zero.  Full length name
  2828. strings may be up to 15 characters long.  Abbreviated name strings may
  2829. be up to 7 characters long.  This will guarantee that the last
  2830. character is an ASCII zero.  After exiting DEBUG, rename the CFG
  2831. executable to CFG.COM.
  2832.  
  2833.  
  2834. ▒▒▒P5  . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2835.  
  2836. Return information about the Intel Pentium processor.
  2837.  
  2838. Command line format:
  2839.  
  2840.       P5 SubCommandName
  2841.  
  2842. The following are valid SubCommandNames:  Model, Off, On, Step.  Each
  2843. SubCommandName may be abbreviated as desired.  An ErrorLevel of 0 is
  2844. returned on non-Pentium processors.  Test for a Pentium using the CPU
  2845. command.
  2846.  
  2847. Model:  Returns an ErrorLevel equal to the model number reported by
  2848. the Pentium processor using the CPUID instruction.  I am not sure, but
  2849. I think Model=1 ==> P60/P66, Model=2 ==> P90, Model=3 ==> P100.  I
  2850. have only been able to test on a P90.
  2851.  
  2852. Step:  Returns an ErrorLevel equal to the stepping level reported by
  2853. the Pentium processor using the CPUID instruction.
  2854.  
  2855. Off/On:  Disables or enables the Pentium FPU.  This should be the
  2856. first DEVICE command in CONFIG.SYS.
  2857.  
  2858.  
  2859. ▒▒▒Page  . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2860.  
  2861. Select/determine the active video display page.
  2862.  
  2863. Command line format:
  2864.  
  2865.       Page [n]
  2866.  
  2867. where "n" corresponds to the desired video display page.  If "n" is
  2868. omitted, no page change occurs.  This command always returns an
  2869. ErrorLevel corresponding to the current display page.  For modes 0 and
  2870. 1, pages 0-7 are valid.  For modes 2 and 3, pages 0-3 are valid.  If
  2871. anything else is specified on the command line, no page change occurs.
  2872.  
  2873. Note that some programs write by default to page zero.
  2874.  
  2875.  
  2876. ▒▒▒Pause . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2877.  
  2878. Suspend execution after printing a prompt message on the screen.
  2879.  
  2880. Command line format:
  2881.  
  2882.       Pause
  2883.  
  2884. Pressing any key resumes execution.  The standard prompt is "CFG 2.41
  2885. Pause - Press any key to continue...".  Use EchoPause to display a
  2886. customized pause message, KeyPause for optional pausing or WaitFor for
  2887. timed pausing.
  2888.  
  2889.  
  2890. ▒▒▒Print . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2891.  
  2892. Determine if the DOS Print command has been installed.
  2893.  
  2894. Command line format:
  2895.  
  2896.       Print
  2897.  
  2898. Exit ErrorLevels:
  2899.  
  2900.       Else = Number of files in print queue
  2901.       253  = Error in PRINT.COM
  2902.       254  = Not installed, but not OK to install
  2903.       255  = Not installed
  2904.  
  2905. This command requires DOS version 3.0 or higher.
  2906.  
  2907.  
  2908. ▒▒▒PrintEcho   . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2909.  
  2910. Controls DOS print echo operation.
  2911.  
  2912. Command line format:
  2913.  
  2914.       PrintEcho SubCommandName
  2915.  
  2916. Exit ErrorLevels:
  2917.  
  2918.       0   = Disabled
  2919.       1   = Enabled
  2920.  
  2921. NOTE:  Uses undocumented information.
  2922.  
  2923. Valid SubCommandNames are: Off, On, Status, Toggle.  Each
  2924. SubCommandName may be abbreviated as desired, but must be unique.
  2925.  
  2926. Off and On:  Turn the DOS print echo function on and off by changing
  2927. its status byte in the DOS data area.  A status message is provided
  2928. for each change in state.
  2929.  
  2930. Status:  Reports the current DOS print echo state.
  2931.  
  2932. Toggle:  Toggles the DOS print echo function from its previous state. 
  2933. A status message is provided for the current state.
  2934.  
  2935. This command is available for MS-DOS Versions 3.1 through 6.22.
  2936.  
  2937. The DOS print echo function is toggled on and off using Ctrl-PrtScr or
  2938. Ctrl-P.  If on, DOS will echo all characters displayed on the screen
  2939. using DOS functions to PRN (LPT1).  Note that this function uses
  2940. undocumented information but has been tested for MS-DOS versions 3.1
  2941. through 6.22.
  2942.  
  2943.  
  2944. ▒▒▒Printer . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2945.  
  2946. Determine the status of the printer.
  2947.  
  2948. Command line format:
  2949.  
  2950.       Printer [n]
  2951.  
  2952. Exit ErrorLevels:
  2953.  
  2954.       0 = Printer ready
  2955.       1 = Printer time-out or device fault
  2956.       2 = Out of paper
  2957.  
  2958. where "n" represents the printer number (1-3).  If "n" is omitted or
  2959. is out of range, the PRN (LPT1) device is assumed.  The ErrorLevels
  2960. are additive.
  2961.  
  2962.  
  2963. ▒▒▒Protected . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  2964.  
  2965. Determine if 80286+ processor is in protected mode.
  2966.  
  2967. Command line format:
  2968.  
  2969.       Protected
  2970.  
  2971. Exit ErrorLevels:
  2972.  
  2973.       0 = Real mode
  2974.       1 = Protected mode
  2975.  
  2976. Calls the CPU command then determines if the processor protected mode
  2977. flag is set for 80286+ processors.
  2978.  
  2979.  
  2980. ▒▒▒PrtScr  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  2981.  
  2982. Print the screen or controls print screen operation.
  2983.  
  2984. Command line format:
  2985.  
  2986.       PrtScr SubCommandName [/F]
  2987.  
  2988. Exit ErrorLevels:
  2989.  
  2990.       0   = Disabled
  2991.       1   = Enabled
  2992.       255 = Last print screen encountered error
  2993.  
  2994. Valid SubCommandNames are: Off, On, Print, Status, Toggle.  Each
  2995. SubCommandName may be abbreviated as desired, but must be unique.
  2996.  
  2997. Off and On:  Turn the BIOS interrupt function on and off by changing
  2998. its status byte in the BIOS data area.  A status message is provided
  2999. for each change in state.
  3000.  
  3001. Print:  Prints the current screen using BIOS Interrupt 5.  A form feed
  3002. is appended if the /F Form Feed switch is used.
  3003.  
  3004. Status:  Reports the current print screen interrupt status.
  3005.  
  3006. Toggle:  Toggles the BIOS interrupt function from its previous state. 
  3007. A status message is provided for the current state.
  3008.  
  3009. The BIOS bases its action on receipt of an Interrupt 5 Print Screen on
  3010. the status byte at 0040:0100.  If the byte indicates that a print
  3011. screen is currently in progress, the BIOS aborts the new request. 
  3012. This provides control of Interrupt 5 without a memory resident
  3013. program.
  3014.  
  3015.  
  3016. ▒▒▒RamDrive  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3017.  
  3018. Detect if the specified drive is a ramdrive or search for one.
  3019.  
  3020. Command line format:
  3021.  
  3022.       RamDrive [/S] [d:] [/Q] [/@EnVar]
  3023.  
  3024. Exit ErrorLevels:
  3025.  
  3026.       Without /S switch
  3027.       ─────────────────
  3028.       0 = Drive is not a ramdrive
  3029.       1 = Drive is a ramdrive
  3030.  
  3031.       With /S switch
  3032.       ──────────────
  3033.          0 = Ramdrive not found
  3034.       Else = Ramdrive found (A:=1, B:=2, etc.)
  3035.  
  3036. This command has several variations.  If "d:" is specified, that drive
  3037. is tested.  If "d:" is omitted, the default drive is tested.
  3038.  
  3039. If the /S switch is specified, a search is performed for the first
  3040. ramdrive.  If "d:" is also specified, the search starts with that
  3041. drive and moves up the drive letter chain.  If "d:" is not specified,
  3042. the search starts with the D: drive.  The search stops when the first
  3043. ramdrive is found or the first nonexistent drive letter is  encountered.  DriveExist is called to determine if a drive exists.
  3044.  
  3045. The ASCII drive specification is written to DOS StdOut only if the /S
  3046. switch is used.  The /Q and /@EnVar switches are functional only when
  3047. /S is also used.
  3048.  
  3049. This command searches for a ramdrive in a manner that is independent
  3050. of finding a specific volume name which can be easily be changed. 
  3051. Since there is no official way of detecting a ramdrive, this command
  3052. makes a determination by searching for three characteristic features: 
  3053. The drive is non-removable, has only one FAT and has a cluster size of
  3054. one sector.  If the first and at least one of the last two are true,
  3055. the drive is considered to be a ramdrive.  The tests are not
  3056. completely foolproof.  The following ramdrives have been tested to
  3057. date and are recognized as valid:
  3058.  
  3059.    Microsoft Vdisk/RamDrive, Ziff-Davis XpanDisk, Qualitas 386disk,
  3060.    PC-Kwik RamDrive.
  3061.  
  3062. Let me know of others which pass or fail the test.
  3063.  
  3064. Note that a ramdrive compressed with DoubleSpace, Stacker, SuperStor,
  3065. Squish or similar product is not recognized unless the uncompressed
  3066. drive is tested.
  3067.  
  3068.  
  3069. ▒▒▒RandomFile  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3070.  
  3071. Create a unique random file name in the specified directory.
  3072.  
  3073. Command line format:
  3074.  
  3075.       RandomFile [d:][path] [/Q] [/@EnVar] [/S]
  3076.  
  3077. Exit ErrorLevels:
  3078.  
  3079.       0 = Successful
  3080.       1 = Invalid DOS version
  3081.       2 = DOS Error: File not found
  3082.       3 = DOS Error: Path not found
  3083.       4 = DOS Error: Too many open files (no handles available)
  3084.       5 = DOS Error: Access denied
  3085.       6 = DOS Error: Invalid handle
  3086.  
  3087. This command creates a randomly named eight letter file name (with no
  3088. extension) in the specified directory (path) using DOS Interrupt 21H
  3089. Function 5AH.  If a path is specified without a drive letter, the
  3090. default drive letter is added to the start of the path.  If no path is
  3091. specified, the default drive and directory is used.  The full path,
  3092. including "." and "..", is resolved using the Dir command.  Note the
  3093. precautions given for this command above.  The command normally
  3094. deletes the file upon completion.  If the /S switch is specified, the
  3095. file is not deleted.  This command requires DOS version 3.0 or higher.
  3096.  
  3097. The RandomFile command is useful for the creation of temporary files
  3098. that have a unique name.  This guarantees that a filename conflict
  3099. will not occur.
  3100.  
  3101.  
  3102. ▒▒▒Rem . . . . . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG]
  3103.  
  3104. Indicate the use of descriptive comments in the CONFIG.SYS file.
  3105.  
  3106. Command line format:
  3107.  
  3108.       Rem [String]
  3109.  
  3110. This allows the entry of remarks in CONFIG.SYS for all DOS versions
  3111. without generating errors.
  3112.  
  3113. REM is implemented in DOS version 5.0+, but is not available in
  3114. earlier versions.  For people who need to maintain standard machine
  3115. configurations, this can be an impediment to clear documentation. 
  3116. While it slows CONFIG.SYS execution slightly, this is the best that
  3117. can be done (easily) for DOS versions prior to 5.0.
  3118.  
  3119.  
  3120. ▒▒▒RenDir  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3121.  
  3122. Rename a directory.
  3123.  
  3124. Command line format:
  3125.  
  3126.       RenDir OldName NewName
  3127.  
  3128. Exit ErrorLevels:
  3129.  
  3130.       0   = No errors
  3131.       255 = DOS error or DOSmajor < 3
  3132.  
  3133. This command requires DOS version 3.0 or higher.  Include the complete
  3134. path for both old and new directory names.  The path is not required
  3135. if the directory being renamed is off the default directory.  The DOS
  3136. functions used cannot rename the drive's current directory.
  3137.  
  3138.  
  3139. ▒▒▒Right . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3140.  
  3141. Return the right most "n" characters from String.
  3142.  
  3143. Command line format:
  3144.  
  3145.       Right n String [/Q] [/@EnVar] [/C]
  3146.  
  3147. where "n" is a decimal number indicating the number of characters to
  3148. return from String, counting from the right.  The /C switch
  3149. capitalizes the returned string.
  3150.  
  3151.  
  3152. ▒▒▒ROMdate . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3153.  
  3154. Display the date of the ROM BIOS.
  3155.  
  3156. Command line format:
  3157.  
  3158.       ROMdate [/Q] [/@EnVar]
  3159.  
  3160. The displayed date is the string of characters found at F000:FFF5 in
  3161. memory.  Not all BIOS may have the date at this location.
  3162.  
  3163.  
  3164. ▒▒▒ROMmodel  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3165.  
  3166. Display the model bytes of the ROM BIOS.
  3167.  
  3168. Command line format:
  3169.  
  3170.       ROMmodel [/Q] [/@EnVar]
  3171.  
  3172. The displayed bytes are in hexadecimal.  If the system supports
  3173. Interrupt 15H Function C0H, then the model, submodel and BIOS revision
  3174. bytes of the ROM configuration table are displayed.  If the system
  3175. does not support this call, the machine model byte at F000:FFFE is
  3176. displayed.  The exit ErrorLevel is equal to the model byte.
  3177.  
  3178.  
  3179. ▒▒▒RootDir . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3180.  
  3181. Determine the file capacity characteristics of the root directory.
  3182.  
  3183. Command line format:
  3184.  
  3185.       RootDir SubCommandName d: [/Q] [/@EnVar]
  3186.  
  3187. where "d:" is the desired drive.  The following are valid
  3188. SubCommandNames: Total, Free, Used.  Each SubCommandName may be
  3189. abbreviated as desired.  Error messages are displayed if the routine
  3190. fails.  This command is useful to determine if a floppy root directory
  3191. has enough space to hold a specific number of file entries.
  3192.  
  3193.  
  3194. ▒▒▒Rows  . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3195.  
  3196. Determine the number of displayed rows.
  3197.  
  3198. Command line format:
  3199.  
  3200.       Rows
  3201.  
  3202. The returned level is based on the value stored in the BIOS data area.
  3203.  
  3204.  
  3205. ▒▒▒Share . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3206.  
  3207. Determine if SHARE.EXE is installed.
  3208.  
  3209. Command line format:
  3210.  
  3211.       Share
  3212.  
  3213. Exit ErrorLevels:
  3214.  
  3215.         0 = Not installed, OK to install
  3216.         1 = Not installed, not OK to install
  3217.         2 = Installed
  3218.       255 = Invalid DOS version
  3219.  
  3220. The command executes Interrupt 2FH Function 10H Subfunction 0.  Note
  3221. that if DOS 4.01 SHARE was automatically loaded due to large disk
  3222. volumes, file sharing is in an inactive state until this call is made. 
  3223. Share reports installed in a Windows DOS session with VSHARE.386
  3224. installed.  This command requires DOS version 3.0 or higher.
  3225.  
  3226.  
  3227. ▒▒▒Shift-AND . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3228.  
  3229. Determine if desired shift keys are depressed.
  3230.  
  3231. Command line format:
  3232.  
  3233.       Shift-AND [Alt] [Ctrl] [Shift]
  3234.  
  3235. Exit ErrorLevels:
  3236.  
  3237.       0 = Some or none of the keys listed are depressed
  3238.       1 = All keys listed are depressed
  3239.  
  3240. The routine will work with either of the paired keys on the keyboard. 
  3241. The requested keys are considered to be "AND"ed, meaning all keys
  3242. listed must be depressed.  The arguments may be shortened as desired,
  3243. but must always be separated by at least one space.  Use the Shift-OR
  3244. command to do an OR comparison of the shift keys.  Use the ShiftState
  3245. command for identifying individual shift keys.
  3246.  
  3247.  
  3248. ▒▒▒ShiftLock . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3249.  
  3250. Determine status of keyboard NumLock, CapsLock, ScrollLock and Insert.
  3251.  
  3252. Command line format:
  3253.  
  3254.       ShiftLock [SubCommandName]
  3255.  
  3256. Exit ErrorLevels:
  3257.  
  3258.       With SubCommandName
  3259.       ───────────────────
  3260.       0 = Lock state is off
  3261.       1 = Lock state is on
  3262.  
  3263.       Without SubCommandName
  3264.       ──────────────────────
  3265.       0 = No lock states are on
  3266.       1 = ScrollLock is on
  3267.       2 = NumLock is on
  3268.       4 = CapsLock is on
  3269.       8 = Insert is on
  3270.  
  3271. The following are valid SubCommandNames:  Caps, Insert, Num, Scroll. 
  3272. Each SubCommandName may be abbreviated as desired.
  3273.  
  3274. Issued without a SubCommandName, the command returns the ErrorLevels
  3275. noted above.  The ErrorLevel is additive and can be in the range of 0
  3276. to 15.
  3277.  
  3278.  
  3279. ▒▒▒Shift-OR  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3280.  
  3281. Determine if desired shift keys are depressed.
  3282.  
  3283. Command line format:
  3284.  
  3285.       Shift-OR [Alt] [Ctrl] [Shift]
  3286.  
  3287. Exit ErrorLevels:
  3288.  
  3289.       0 = None of the keys listed are depressed
  3290.       1 = At least one of the keys listed is depressed
  3291. The routine will work with either of the paired keys on the keyboard. 
  3292. The requested keys are considered to be "OR"ed, meaning at least one
  3293. of the keys listed must be depressed.  The arguments may be shortened
  3294. as desired, but must always be separated by at least one space.  Use
  3295. the Shift-AND command to do an AND comparison of the shift keys.  Use
  3296. the ShiftState command for identifying individual shift keys.
  3297.  
  3298.  
  3299. ▒▒▒ShiftState  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3300.  
  3301. Determine which shift keys are depressed.
  3302.  
  3303. Command line format:
  3304.  
  3305.       ShiftState
  3306.  
  3307. Exit ErrorLevels:
  3308.  
  3309.        0 = None of the shift keys are depressed
  3310.        1 = Right shift
  3311.        2 = Left shift
  3312.        4 = Right ctrl
  3313.        8 = Left ctrl
  3314.       16 = Right alt
  3315.       32 = Left alt
  3316.  
  3317. The ErrorLevel is additive and can be in the range of 0 to 63.  Use
  3318. the Shift-OR command to do an OR comparison of the shift keys.  Use
  3319. the Shift-AND command to do an AND comparison of the shift keys.
  3320.  
  3321.  
  3322. ▒▒▒Stacker . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3323.  
  3324. Identify the presence of a Stacker device driver in memory and
  3325. optionally determine if a specific drive is a Stacker volume.
  3326.  
  3327. Command line format:
  3328.  
  3329.       Stacker [d:]
  3330.  
  3331. Exit ErrorLevels:
  3332.  
  3333.       Without argument:
  3334.             0    = Not installed
  3335.             Else = Installed [(32*major)+minor]
  3336.  
  3337.       With argument:
  3338.             0   = Not a Stacker volume
  3339.             1   = Valid stacker volume
  3340.             255 = Invalid drive letter
  3341.  
  3342. where "d:" represents an optional drive letter to be checked as being
  3343. a Stacker volume.
  3344.  
  3345. When run without command line arguments, a driver status message is
  3346. displayed.  The version 2.01 driver will return an ErrorLevel of 65.
  3347.  
  3348. If any character is included on the command line, CFG checks to see if
  3349. it is a valid drive letter from A to Z.  For legal drive letters, CFG
  3350. checks to see if that drive corresponds to a valid Stacker volume. 
  3351. The appropriate message is displayed in each case.  The drive does not
  3352. have to be a valid DOS drive to be checked.  The Stacker device driver
  3353. consults an internal table to determine if the drive is a Stacker
  3354. volume.  If a removable disk drive is checked (such as a floppy disk  or a Bernoulli), the drive must be mounted in order to provide a valid
  3355. response.  A reserved removable drive that does not have a volume
  3356. mounted will return an invalid response.
  3357.  
  3358.  
  3359. ▒▒▒TaskSwitch  . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3360.  
  3361. Determine whether a task switcher is installed and enabled.
  3362.  
  3363. Command line format:
  3364.  
  3365.       TaskSwitch [/Q] [/@EnVar]
  3366.  
  3367. Exit ErrorLevels:
  3368.  
  3369.       0 = Not installed
  3370.       1 = Installed (disabled)
  3371.       2 = Installed (enabled)
  3372.  
  3373. Determines if any task switcher meeting the DOS 5.0 specification is
  3374. installed.  If it is, the name of the task switcher is displayed.
  3375.  
  3376.  
  3377. ▒▒▒Toggle  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3378.  
  3379. Modifies the current shift state of the keyboard NumLock, CapsLock or
  3380. ScrollLock keys.
  3381.  
  3382. Command line format:
  3383.  
  3384.       Toggle [N[+|-]] [C[+|-]] [S[+|-]] [/S]
  3385.  
  3386. where "N" represents the NumLock state, "C" represents the CapsLock
  3387. state and "S" represents the ScrollLock state.  Toggle changes the
  3388. current shift state of the keyboard NumLock, CapsLock or ScrollLock
  3389. keys when used with just the letters.  The state of the three keys is
  3390. explicitly turned on or off if the optional + or - argument is
  3391. supplied.  The /S switch will write to the keyboard port to
  3392. synchronize the keyboard LEDs of systems that have a BIOS that does
  3393. not automatically perform the update.
  3394.  
  3395.  
  3396. ▒▒▒Tones . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3397.  
  3398. Programs the system's speaker port to emit a rising (Upward) or
  3399. falling (Downward) series of tones.
  3400.  
  3401. Command line format:
  3402.  
  3403.       Tones SubCommandName
  3404.  
  3405. The following are valid SubCommandNames: Down, Up, Over, Under.  Each
  3406. SubCommandName may be abbreviated as desired.  Error messages are
  3407. displayed if the routine fails.  Over calls Up then Down.  Under calls
  3408. Down then Up.
  3409.  
  3410.  
  3411. ▒▒▒Typematic . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3412.  
  3413. Set the keyboard typematic rate and delay.
  3414.  
  3415. Command line format:
  3416.  
  3417.       Typematic [m,n|Fast]
  3418.  
  3419. Exit ErrorLevels:
  3420.  
  3421.       0   = No errors
  3422.       255 = Invalid value
  3423.  
  3424. where "m" corresponds to the typematic rate (1-32) and "n" corresponds
  3425. to the delay (1-4) in 1/4 second increments.  For the rate, the larger
  3426. the number, the faster the rate.  The Fast option is equivalent to
  3427. options of 32,1, setting the fastest repeat rate and shortest delay. 
  3428. If no arguments are given, default values are used, equivalent to
  3429. options of 20,2.  The values that the BIOS accepts are divisors that
  3430. cannot be easily translated into characters per second.  The table
  3431. below lists some of the rate values and the equivalent number of
  3432. characters per second:
  3433.  
  3434.       1 = 2.0  │  12 = 5.0  │  20 = 10.0  │  28 = 20.0
  3435.       6 = 3.0  │  14 = 6.0  │  22 = 12.0  │  30 = 24.0
  3436.       9 = 4.0  │  17 = 8.0  │  25 = 16.0  │  32 = 30.0
  3437.  
  3438.  
  3439. ▒▒▒Upper . . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3440.  
  3441. Return String all in upper case.
  3442.  
  3443. Command line format:
  3444.  
  3445.       Upper String [/Q] [/@EnVar]
  3446.  
  3447. If String starts with a double quote ["], the double quote is deleted
  3448. but leading separators are removed.
  3449.  
  3450.  
  3451. ▒▒▒Verify  . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3452.  
  3453. Return status of DOS Verify option.
  3454.  
  3455. Command line format:
  3456.  
  3457.       Verify
  3458.  
  3459. Exit ErrorLevels:
  3460.  
  3461.       0 = Off
  3462.       1 = On
  3463.  
  3464.  
  3465. ▒▒▒Version . . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3466.  
  3467. Determine the version of various drivers/programs.
  3468.  
  3469. Command line format:
  3470.  
  3471.       Version SubCommandName
  3472.  
  3473. Exit ErrorLevels:
  3474.  
  3475.       0    = Not installed
  3476.       Else = EMS/VCPI/XMS version [(16*major)+minor]
  3477.       Else = DPMI version [(100*major)+minor]
  3478.       Else = DOS version [(32*major)+minor]
  3479.       Else = CFG version [(100*(major-2))+minor] <Ver 2.2 returns 20>
  3480.  
  3481. Valid SubCommandNames are: CFG, DOS, DPMI, EMS, VCPI, XMS.  The DOS
  3482. SubCommand returns the same information as the DOSversion command,
  3483. including the /T switch.
  3484.  
  3485.   DPMI - DOS Protected-Mode Interface
  3486.   EMS  - Expanded Memory Specification
  3487.   VCPI - Virtual Control Program Interface
  3488.   XMS  - Extended Memory Specification
  3489.  
  3490.  
  3491. ▒▒▒VGA25 . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3492.  
  3493. Set a 25 line VGA screen.
  3494.  
  3495. Command line format:
  3496.  
  3497.       VGA25 [/C]
  3498.  
  3499. Forces the use of the display adapter's internal 8x16 font.  Interrupt
  3500. 10H Function 11H Subfunction 14H performs an adapter mode reset when
  3501. it executes.  This works on VGA in a display independent way.  The /C
  3502. switch clears the screen after switching modes if ANSI is installed to
  3503. set the screen color.
  3504.  
  3505. This command is in effect only for video modes 0-3.
  3506.  
  3507.  
  3508. ▒▒▒VGA43 . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3509.  
  3510. Set a 43 line VGA screen.
  3511.  
  3512. Command line format:
  3513.  
  3514.       VGA43 [/C]
  3515.  
  3516. Forces the use of the display adapter's internal 8x14 font.  Interrupt
  3517. 10H Function 11H Subfunction 11H performs an adapter mode reset when
  3518. it executes.  This works on VGA in a display independent way.  The /C
  3519. switch clears the screen after switching modes if ANSI is installed to
  3520. set the screen color.
  3521.  
  3522. This command is in effect only for video modes 0-3.
  3523.  
  3524.  
  3525. ▒▒▒VGA50 . . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3526.  
  3527. Set a 50 line VGA screen.
  3528.  
  3529. Command line format:
  3530.  
  3531.       VGA50 [/C]
  3532.  
  3533. Forces the use of the display adapter's internal 8x8 font.  Interrupt
  3534. 10H Function 11H Subfunction 12H performs an adapter mode reset when
  3535. it executes.  This works on VGA in a display independent way.  The /C
  3536. switch clears the screen after switching modes if ANSI is installed to
  3537. set the screen color.
  3538.  
  3539. This command is in effect only for video modes 0-3.
  3540.  
  3541.  
  3542. ▒▒▒VideoMode . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3543.  
  3544. Determine/set the current video mode.
  3545.  
  3546. Command line format:
  3547.  
  3548.       VideoMode [n]
  3549.  
  3550. If the optional hexadecimal number "n" is added, the designated video
  3551. mode is set.  The returned ErrorLevel is based on the value stored in
  3552. the BIOS data area.
  3553.  
  3554.  
  3555. ▒▒▒WaitFor . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3556.  
  3557. Delay program execution for the number of minutes and seconds given on
  3558. the command line.
  3559.  
  3560. Command line format:
  3561.  
  3562.       WaitFor [mm:]ss [/N]
  3563.  
  3564. Exit ErrorLevels:
  3565.  
  3566.       0   = Timed out as requested
  3567.       1   = Exited prior to time out due to key press
  3568.       255 = Format error
  3569.  
  3570. where "mm" is the delay time in minutes and "ss" is in seconds.  If a
  3571. single number is on the command line, it is assumed to be seconds. 
  3572. The default is one second.  The /N switch tells CFG to not flush the
  3573. keyboard buffer prior to executing the command.
  3574.  
  3575. CFG only checks for a ":" between the minutes and seconds.  Any other
  3576. character or separator will cause the minutes value to be treated as
  3577. seconds and the seconds value to be ignored.  Spaces should not be
  3578. used on either side of the colon.
  3579.  
  3580. Pressing any key during the wait period will cancel the wait.  CFG
  3581. checks the keyboard buffer 18 times a second for a key press.
  3582.  
  3583.  
  3584. ▒▒▒WaitTo  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3585.  
  3586. Delay execution until the specified time of day.
  3587.  
  3588. Command line format:
  3589.  
  3590.       WaitTo hh:mm[:ss] [/N]
  3591.  
  3592. Exit ErrorLevels:
  3593.  
  3594.       0   = Timed out as requested
  3595.       1   = Exited prior to time out due to key press
  3596.       255 = Format error
  3597.  
  3598. where "hh" is the hour (0-23), "mm" is the minute (0-59) and "ss" is
  3599. the second (0-59).  If the seconds are omitted, 0 is assumed.  The /N
  3600. switch tells CFG to not flush the keyboard buffer prior to executing
  3601. the command.
  3602.  
  3603. Pressing any key during the wait period will cancel the wait.  If a
  3604. key is waiting in the buffer and /N is not specified, the command
  3605. immediately ends.
  3606.  
  3607.  
  3608. ▒▒▒WarmBoot  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3609.  
  3610. Perform a keyboard (Ctrl-Alt-Delete) system reset.
  3611.  
  3612. Command line format:
  3613.  
  3614.       WarmBoot SubCommandName [/V]
  3615.  
  3616. The following are valid SubCommandNames: WaitFor, WaitTo, Verify. 
  3617. Each SubCommandName may be abbreviated as desired.  Error messages are
  3618. displayed if the routine fails.  All disk buffers that may not yet be
  3619. written are flushed to disk via Interrupt 21H Function 0DH (Disk
  3620. Reset) prior to system reset.  For 8086/8088 processors only, the
  3621. command jumps to FFFF:0000 after clearing the warm boot flag in the
  3622. BIOS data area.  For 80286+ processors, the system is reset via the
  3623. keyboard controller.  The /V Verify switch is available for use with
  3624. the WaitFor and WaitTo subcommands.
  3625.  
  3626. WaitFor:  Executes the WaitFor command first.  All command line
  3627. options of the WaitFor command are available.
  3628.  
  3629. WaitTo:  Executes the WaitTo command first.  All command line options
  3630. of the WaitTo command are available.
  3631.  
  3632. Verify:  Prompt before rebooting.
  3633.  
  3634.  
  3635. ▒▒▒Window  . . . . . . . . . . . . . . . . . . . . . .  [CONFIG/BATCH]
  3636.  
  3637. Draw boxes on the screen in the desired color.
  3638.  
  3639. Command line format:
  3640.  
  3641.       Window r c w h [b ["Fore [on] Back"]
  3642.  
  3643. where "r" is the top row of the box, "c" is the left column of the box
  3644. "w" is the box width, "h" is the box height and "b" is the box type
  3645. (0-2).  The color must be enclosed by double quotation marks and
  3646. follows the same requirements as the Cls command.  The top left screen
  3647. corner is 1 1.
  3648. Three box types are available.  For b=0, the box is drawn without
  3649. borders.  For b=1, the box has single-line borders.  For b=2, the box
  3650. has double-line borders.  If "b" is omitted, b=0 is assumed.  A value
  3651. for "b" must be specified in order to include a color.  If a color is
  3652. not specified, the current screen colors are used.
  3653.  
  3654. The smallest window allowed is 2 characters in width and height.  The
  3655. area inside the border is blanked with spaces.  Text can be added to
  3656. the frame using the Locate and Cecho commands.
  3657.  
  3658.  
  3659. ▒▒▒Windows . . . . . . . . . . . . . . . . . . . . . . . . . .  BATCH]
  3660.  
  3661. Determine if Microsoft Windows is currently running.
  3662.  
  3663. Command line format:
  3664.  
  3665.       Windows
  3666.  
  3667. Exit ErrorLevels:
  3668.  
  3669.       0 = Windows is not running
  3670.       1 = Windows is running in either Real or Standard mode
  3671.       2 = Windows is running in Enhanced mode
  3672.  
  3673.  
  3674. ▒▒▒ZeroFile  . . . . . . . . . . . . . . . . . . . . . . . . . [BATCH]
  3675.  
  3676. Creates or truncates a file to a length of zero.
  3677.  
  3678. Command line format:
  3679.  
  3680.       ZeroFile [/T] Filename
  3681.  
  3682. Exit ErrorLevels:
  3683.  
  3684.       0 = Successful (file did not previously exist)
  3685.       1 = Successful (file existed and was truncated)
  3686.       With error, ErrorLevel is the DOS error code (1-13)
  3687.  
  3688. This command will create a zero-byte file with the desired name.  If
  3689. the file already exists, the /T Truncate switch must be specified for
  3690. CFG to truncate it.  This command is useful to create zero-byte files
  3691. to serve as flags for batch files to store information without an
  3692. environment variable.  A zero-byte file takes up no disk storage space
  3693. other than its directory entry.
  3694.                   Appendix A:  Problems and Solutions
  3695.  
  3696.  
  3697. I pass multiple CFG commands to a batch file, but they do not execute
  3698. or cause an error.
  3699.  
  3700.       This occurs when you use the MultiCommand separator with
  3701.       replaceable DOS batch file parameters.  DOS treats the
  3702.       MultiCommand separator semicolon as white space and deletes it
  3703.       while passing the parameter.  This is what causes the errors. 
  3704.       The solution is to use the semicolon in the called batch file or
  3705.       set up the CFG commands on separate lines.
  3706.  
  3707.                        Appendix B:  Bibliography
  3708.  
  3709.  
  3710. Ralph Brown and Jim Kyle, _PC Interrupts_, Second Edition, Reading MA:
  3711. Addison-Wesley, 1994.
  3712.  
  3713. Geoff Chappell, _DOS Internals_, Reading MA: Addison-Wesley, 1993.
  3714.  
  3715. Ray Duncan (ed), _The MS-DOS Encyclopedia_, Redmond WA: Microsoft
  3716. Press, 1988 (out of print).
  3717.  
  3718. Frank Van Gilluwe, _Undocumented PC_, Reading MA: Addison-Wesley,
  3719. 1994.
  3720.  
  3721. Microsoft Corporation, _Microsoft MS-DOS Programmer's Reference_,
  3722. Second Edition, Redmond WA: Microsoft Press, 1993.
  3723.  
  3724. Andrew Schulman, et al., _Undocumented DOS_, Second Edition, Reading
  3725. MA: Addison-Wesley, 1994.
  3726.  
  3727.  
  3728. There have been several other books I have use that have proved to be
  3729. valuable:
  3730.  
  3731. Ray Duncan, _Power Programming with Microsoft Macro Assembler_,
  3732. Redmond WA: Microsoft Press, 1992.
  3733.  
  3734. Harley Hahn, _Assembler Inside and Out_, Berkeley CA: McGraw-Hill,
  3735. 1992.
  3736.  
  3737. Robert Hummel, _Assembly Language Lab Notes_, Emeryville CA: Ziff-
  3738. Davis Press, 1992.
  3739.  
  3740. Peter Norton and Richard Wilton, _The New Peter Norton Programmer's
  3741. Guide to the IBM PC & PS/2_, Second Edition, Redmond WA: Microsoft
  3742. Press, 1988 (out of print).
  3743.  
  3744. Marcus Johnson, _Assembly Language: For Real Programmers Only_, Carmel
  3745. IN: Sams Publishing, 1993.
  3746.  
  3747. Allen L. Wyatt, Sr., _Advanced Assembly Language_, Carmel IN: Que
  3748. Corporation, 1992.
  3749.  
  3750.  
  3751. With these, you too can write a program like CFG.  Have fun.
  3752.                      Appendix C:  Revision History
  3753.  
  3754.  
  3755. Version 1.0 --- 28 August 1992
  3756.    *  First public version.  Supported Beep, Cls, ComHide, ComSwap,
  3757.       Echo, EchoPause, EGA25, EGA43, KeyPause, LptHide, LptSwap, Mono,
  3758.       Pause, Tones, VGA25, VGA43, VGA50 and WaitFor commands.
  3759.  
  3760. Version 1.1 --- 11 September 1992
  3761.    *  Revised command line parsing.  Recognizes the plus sign, equals
  3762.       sign and comma as separators.
  3763.    *  Revised the method for detecting ANSI.  Previously, the ANSI
  3764.       Device Status Report sequence was used.  This proved unreliable
  3765.       on some systems when StdIn did not reflect a valid Cursor
  3766.       Position Report from ANSI.  The new method uses cursor
  3767.       positioning sequences.
  3768.    *  Revised and updated the documentation.
  3769.  
  3770.    *  Cls:  Corrected a bug that caused bright colors to sometimes be
  3771.       displayed in low intensity, removed a mismatch between the DOS
  3772.       and ANSI color values, and added color parsing error messages.
  3773.    *  Tones:  Corrected error which made the command unavailable.
  3774.  
  3775.    *  Added the Color, IACAfill and Rem commands as well as the
  3776.       IACAread companion program.
  3777.  
  3778. Version 2.0 --- 1 January 1993
  3779.    *  Program is now dual mode with a .COM extension.  The separate
  3780.       IACAread program is no longer required since that command is
  3781.       incorporated from the command line.
  3782.    *  Improved error handling and reporting.
  3783.    *  Deleted the plus sign from the list of separator characters.
  3784.    *  Revised, updated and reformatted the documentation.
  3785.  
  3786.    *  Beep:  Optionally allows specification of frequency and length
  3787.       of sound, with the ability to do multiple sounds from a single
  3788.       command line.
  3789.    *  Cls:  Sets the screen border color to that of the background and
  3790.       restores the cursor to its previous size.
  3791.    *  EGA25, EGA43, VGA25, VGA43 and VGA50:  These screen mode
  3792.       commands now optionally issue a ANSI escape sequence to clear
  3793.       the screen after the mode change to reset the screen color if
  3794.       the /C switch is specified.
  3795.    *  KeyPause:  Also sets an ErrorLevel.
  3796.  
  3797.    *  Added the AM, ANSI, ASCII, Blink, Border, Break, CanCopy, Cecho,
  3798.       ColdBoot, Cols, Compare, CoProc, CPU, Cursor, Day, DESQview,
  3799.       DirExist, Display, DOSmajor, DOSminor, DOSversion, Drive,
  3800.       DriveExist, DriveReady, DriveSize, DriveSpace, EMSversion, Env,
  3801.       FileDTC, FileExist, Files, FileSize, FileText, FullYear, GetKey,
  3802.       Hour, IACAread, Intense, IsVol, Locate, Memory, Minute, Month,
  3803.       Page, PM, Protected, PrtScr, RamDrive, RenDir, ROMdate,
  3804.       ROMmodel, Rows, Second, Share, Shift-AND, ShiftLock, Shift-OR,
  3805.       ShiftState, StacInst, Toggle, Typematic, Verify, VideoMode,
  3806.       WaitTo, WarmBoot, WeekDay, Window and Year commands.  (Whew!)
  3807.  
  3808. *** Mediterranean/Red Sea Deployment 1993 ***  Versions 2.1 and 2.2
  3809. were written while deployed aboard USS Theodore Roosevelt (CVN 71)
  3810. during support missions for the United Nations sanctioned NATO
  3811. Operations Provide Promise and Deny Flight in Bosnia-Herzegovina and
  3812. Operation Sharp Guard in the Adriatic Sea.  We also participated in
  3813. Operation Southern Watch (southern Iraq no-fly zone) from the Red Sea. 
  3814. The deployment was 11 March to 8 September 1993.
  3815. Version 2.1 --- 12 May 1993
  3816.       This version is released for Bantam Books "PC Magazine DOS Power
  3817.       Tools 6.0" by Paul Somerson.
  3818.  
  3819.    *  Added extended ErrorLevel reporting via the /E+ switch.  The
  3820.       ErrorLevel which would be returned is now displayable from
  3821.       CONFIG.SYS.
  3822.    *  The exit ErrorLevel is now automatically included as part of an
  3823.       error message display.
  3824.    *  Invalid CommandNames and file names are now displayed for easier
  3825.       identification.
  3826.    *  The Help system screen code was modified for VGA and monochrome
  3827.       systems.
  3828.  
  3829.    *  ANSI:  Corrected a bug which caused a false negative report if
  3830.       the cursor was already in the home position.  If ANSI is not
  3831.       present, screen characters are now restored instead of erased. 
  3832.       These changes extend to all commands which test for/use ANSI.
  3833.    *  ColdBoot:  Optionally prompts the user to verify the reboot if
  3834.       the /V Verify switch is used.
  3835.    *  Cecho, Echo, EchoPause:  Commands completely rewritten to
  3836.       correct a parsing error that would not correctly handle a
  3837.       carriage return/line feed sequence.  The default tilde (~)
  3838.       format character can now be used from a batch file.
  3839.    *  Env:  Optionally finds the environment of the immediate parent
  3840.       process if the /P Parent switch is specified.
  3841.    *  FileSize:  Changed block calculation such that a partial block
  3842.       is added to the total number of blocks vice being ignored.
  3843.    *  IACAfill:  Unconditionally overwrites the IACA if the /O switch
  3844.       is specified.
  3845.    *  IACAread:  Optionally clears the IACA after reading if the /C
  3846.       switch is specified.  This was nonfunctional in version 2.0.
  3847.    *  RamDrive:  The /A switch now writes the correct letter to
  3848.       StdOut, provides the correct ErrorLevel and corrects a bug which
  3849.       could hang the machine if an unoccupied removable drive was
  3850.       encountered during a /S search.
  3851.    *  ROMdate:  Displays all eight characters of the date for ROMs
  3852.       that have nonstandard date formats.
  3853.    *  StacInst:  Renamed "Stacker".
  3854.    *  WarmBoot:  See ColdBoot changes above.
  3855.    *  WeekDay, Day, Month, Hour and Minute:  All accept an optional
  3856.       parameter for direct comparison with the normal output.
  3857.  
  3858.    *  Added the DS4, Help, Keyboard, KeyBuffer, LastDrive, RandomFile
  3859.       and Windows commands.
  3860.  
  3861. Version 2.2 --- 10 November 1993
  3862.    *  Added the ability for the program to place its output directly
  3863.       into the DOS master environment and to directly manipulate
  3864.       environment strings.  The /@EnVar switch must be specified.  See
  3865.       the individual commands to determine support for this switch.
  3866.    *  CommandName and SubCommandName parsing was completely rewritten
  3867.       for ease in future expansion.  SubCommandNames may now be
  3868.       abbreviated to any number of characters.  Invalid
  3869.       SubCommandNames are displayed for easier identification.
  3870.    *  The /A ASCII output switch no longer has a global effect.  All
  3871.       screen output is displayed unless the /Q Quiet switch is used. 
  3872.       /Q has no effect on the Cecho, Echo and EchoPause commands.
  3873.    *  The /Dn Divisor switch is now effective for all commands that
  3874.       return an ErrorLevel except for a few specific cases.  The
  3875.       default divisor is 1.
  3876.    *  The /, Comma switch adds commas every three places to displayed
  3877.       numbers.
  3878.    *  Beep:  Pressing any key while playing now ends the command. 
  3879.       Added the /N No-Flush switch.
  3880.    *  CoProc, CPU, Protected:  Corrected a stack restoration problem
  3881.       in the Intel code which could possibly lock up the machine.
  3882.    *  DOSversion:  Added the /T True option.  See Version command.
  3883.    *  DriveVolume:  Corrected handling of volume names longer than
  3884.       eight characters.  It worked previously if the period was
  3885.       manually inserted between characters eight and nine.
  3886.    *  EMSversion:  Command deleted - added to Version command.
  3887.    *  Env:  Added the Clear, Fill, Reset and Set string SubCommands.
  3888.    *  FileSize:  Corrected block calculation for files larger than 64
  3889.       KB.
  3890.    *  FullYear:  Corrected calculation for years greater than 1999.
  3891.    *  GetKey:  Corrected documentation to say function keys *must* be
  3892.       preceded by an "F".  Numbers without an "F" were interpreted as
  3893.       scan codes (as intended); only the documentation was in error. 
  3894.       Added the Escape key and Ctrl-/Alt- letter key combinations to
  3895.       the parse list, the /C Case sensitive switch, the /S Show
  3896.       (display) switch, the "D:t,p" option and the "Sn" option. 
  3897.       Standard separators are now parsed out.
  3898.    *  IACAread:  Rewritten to use standard program output routines.
  3899.    *  IsVol:  Renamed "DriveVolume".
  3900.    *  Memory:  Deleted the /R Report switch.  A screen report is
  3901.       always made unless /Q is used.  Exit ErrorLevel is now based on
  3902.       whether or not a decimal number is present after the
  3903.       SubCommandName.  Added the High and UMB SubCommands.  Changed
  3904.       the "Xpanded" SubCommandName to "Expanded".  [Extensive rewrite]
  3905.    *  PrtScr:  Added control and indication of the DOS print echo.
  3906.    *  RandomFile:  Resolves "." and ".." using the Dir command.
  3907.    *  ShiftState:  Corrected bug which made function inoperative.
  3908.    *  Tones:  Added the Over and Under options.  Made the tone length
  3909.       processor speed independent.
  3910.    *  VGA25:  Changed from issuing a mode 3 reset to using the display
  3911.       adapter's internal 8x16 font.
  3912.    *  WaitFor:  Checks the keyboard buffer for a key press each timer
  3913.       tick vice once each second.  Added the /N No-Flush switch.
  3914.    *  WaitTo:  Added the /N No-Flush switch.
  3915.  
  3916.    *  Added the Boot, CodePage, Country, Device, Dir, DosKey, FileDir,
  3917.       FileDrive, FileExt, FileName, Input, KeyStuff, LastBoot, Left,
  3918.       Length, Lower, MachineName, Mid, Mouse, Now, Print, Printer,
  3919.       Right, RootDir, TaskSwitch, Upper, Version and ZeroFile
  3920.       commands.
  3921.  
  3922. Version 2.3 --- 1 May 1994
  3923.    *  CFG is now multi-segmented (an EXE hiding in the COM file) in
  3924.       order to support further additions (and my sanity), using MASM
  3925.       6.11 vice TASM 1.0.
  3926.    *  CFG now has a MultiCommand mode that allows multiple
  3927.       CommandNames on a single command line.  Each command must be
  3928.       separated by a semi-colon.
  3929.    *  Switches are now not scanned within fully quoted text strings.
  3930.    *  Added the /@EnVar switch "=" option to capitalize the associated
  3931.       EnVar.
  3932.    *  Added the /Bn switch to establish the desired number system base
  3933.       to use for some commands.
  3934.    *  Added to the /E switch:  "@" option to place the output
  3935.       ErrorLevel in the "EL" environment variable, "!" option to
  3936.       specify which of the possible ErrorLevels to return in
  3937.       MultiCommand mode, "E" option to allow basic ErrorLevel display
  3938.       when all those other options are used.
  3939.    *  Corrected a bug in the environment code if the low memory
  3940.       COMMAND.COM stub had been moved to the UMB area by a memory
  3941.       manager (like 386Max).  [This was in the /1B search method.]
  3942.    *  Changed the default method for locating the master environment. 
  3943.       The /1 switch specifies the primary or master environment.  The
  3944.       /1A and /1B options control specific search methods.  The /2
  3945.       switch specifies the secondary or parent environment.  The old
  3946.       /P switch is still valid, but the /2 switch will ensure future
  3947.       compatibility.  See the DOS Environment section of the CFG.ADD
  3948.       file for details.
  3949.    *  CFG will now update both the master and parent environments, if
  3950.       desired.  See the Switches section for details.
  3951.    *  Commas are now ignored while reading numbers on the command line
  3952.       unless specified in the command description.
  3953.  
  3954.    *  ASCII:  Added /Bn support.
  3955.    *  Beep:  Changed argument format--tone and duration values are now
  3956.       separated by spaces; argument pairs are now separated by commas. 
  3957.       This change is required for the multiple command format.  The
  3958.       strict "no spaces" format is no longer required.  Added /Bn
  3959.       support.
  3960.    *  Cecho:  /B Blink switch changed to /K to support multiple number
  3961.       bases.
  3962.    *  ColdBoot:  Added the WaitFor, WaitTo and Verify subcommands.
  3963.    *  CoProc:  Corrected error identifying an 80486DX as "not
  3964.       installed".  Added Pentium identification.
  3965.    *  CPU:  Added Pentium identification.
  3966.    *  Device:  Changed format of the command to eliminate the
  3967.       confusing set of switches.  New SubCommands are Exist, List and
  3968.       Rename.  The /N and /R switches have been deleted.
  3969.    *  Env:  See environment changes above.  Added the Caps subcommand.
  3970.    *  KeyPause:  Corrected bug that would not return the desired
  3971.       ErrorLevel.
  3972.    *  MachineName:  Now correctly displays names with embedded spaces.
  3973.    *  Memory:  Corrected error that made the desired memory comparison
  3974.       inoperative.  Added environment output and desired memory
  3975.       comparison for all subcommands.
  3976.    *  Memory Main:  Now bases calculation on location of CFG's PSP due
  3977.       to the EXE format.
  3978.    *  Mouse:  Changed ErrorLevel reporting.  An error in the reference
  3979.       I used led me astray.
  3980.    *  PrtScr:  Added ErrorLevel reporting for previous system PrtScr
  3981.       error.
  3982.    *  VideoMode:  Added the option of setting the desired video mode.
  3983.    *  WarmBoot:  See ColdBoot.
  3984.  
  3985.    *  Added the Add, And, Convert, Div, DOSlocation, DOSstartup,
  3986.       ErrorLevel, Lock, Mod, Mul, Not, Or, Sub and Xor commands.
  3987.  
  3988. Version 2.31 --- 21 May 1994
  3989.  
  3990.    *  FileText:  Corrected bug that always returned string not
  3991.       present.  Added the /C Case switch for case insensitive
  3992.       searches.
  3993.  
  3994. Version 2.32 --- 1 July 1994
  3995.       The Great Bug Hunt:  Here is a whole bunch of stuff that I
  3996.       should have found earlier.  Version 2.30 had quite a number of
  3997.       changes, perhaps too many.  I can only say that I have a much
  3998.       more systematic method of testing now.
  3999.  
  4000.    *  Added Internal Error checking.  This should never happen, but it
  4001.       allows things to end a little bit more gracefully.
  4002.    *  Corrected display of messages during the /1B environment search
  4003.       error exit.
  4004.    *  Corrected failure to display "Out of Environment Space" error
  4005.       message.
  4006.    *  Corrected documentation about missing VGA command.  The command
  4007.       is not yet included.
  4008.    *  Note 1:  Corrected bugs in several commands which caused errors
  4009.       if they were not the last command on a line in MultiCommand
  4010.       mode.
  4011.    *  Note 2:  Corrected bugs in several commands which always
  4012.       returned strings capitalized.
  4013.  
  4014.    *  ColdBoot:  Revised reboot method for 286+ processors.  The
  4015.       system is now reset via the keyboard controller.
  4016.    *  DriveExist:  Note 1.
  4017.    *  DriveReady:  Note 1.
  4018.    *  DriveVolume:  Added testing for invalid drive designation.
  4019.    *  Env:  Corrected bug which put the Fill subcommand into a loop
  4020.       and disabled the Reset subcommand.  Fixed Set command.
  4021.    *  FileDTC:  Note 1.
  4022.    *  Left:  Notes 1 and 2.  Added the /C switch.
  4023.    *  Mid:  Notes 1 and 2.  Added the /C switch.
  4024.    *  Right:  Note 2.  Added the /C switch.
  4025.    *  Toggle:  Corrected bug which incorrectly displayed lock status.
  4026.    *  WaitFor:  Added ErrorLevel return.
  4027.    *  WarmBoot:  See ColdBoot.
  4028.  
  4029. Version 2.4 --- 1 October 1994
  4030.       This version is released for TAB Books "The Ultimate Batch File
  4031.       Book" by Ronny Richardson (or whatever it finally gets called).
  4032.  
  4033.    *  CFG is now Shareware with a $25 registration fee.  Please
  4034.       support shareware.
  4035.    *  On-line Help now includes searchable access of the CFG.DOC file. 
  4036.       See the Help command above for details.  Quick Help is now a
  4037.       separate CFG.HLP file and includes a list of SubCommandNames. 
  4038.       This allows a smaller executable and faster loading, especially
  4039.       when executed from CONFIG.SYS.  Both files must be in the same
  4040.       directory as the CFG executable to be found.
  4041.    *  The /P switch no longer specifies the secondary environment. 
  4042.       Use the /2 switch.
  4043.    *  Note 3:  Added the /@EnVar switch function to the arithmetic
  4044.       commands.  The /Q Quiet switch is noted for completeness.
  4045.  
  4046.    *  Add:  Note 3.
  4047.    *  And:  Note 3.
  4048.    *  Cecho:  Corrected batch capitalization problem.
  4049.    *  Div:  Note 3.
  4050.    *  EGA43:  Now generates an error if you try to switch the video
  4051.       font size while in video mode 4 or above.
  4052.    *  Env:  Added the Save SubCommand.  Now handles full environments
  4053.       better.
  4054.    *  Help:  See above.
  4055.    *  KeyBuffer:  Changed format of the command to standardize the
  4056.       options.  New SubCommands are Set and Status.
  4057.    *  LptSwap:  Now swaps printer timeout values also.
  4058.    *  Mod:  Note 3.
  4059.    *  Mul:  Note 3.
  4060.    *  Not:  Note 3.
  4061.    *  Or:  Note 3.
  4062.    *  PrtScr:  Changed format of the command to eliminate the
  4063.       confusing set of options.  New SubCommands are Off, On, Print,
  4064.       Status and Toggle.  Moved DOS print echo control to the
  4065.       PrintEcho command.
  4066.    *  Sub:  Note 3.
  4067.    *  VGA25, VGA43 and VGA50:  See EGA43.
  4068.    *  Xor:  Note 3.
  4069.  
  4070.    *  Added the ComBaud, ComSet, DriveID, FileLines, GamePort, LptSet
  4071.       and PrintEcho commands.
  4072.  
  4073. Version 2.41 --- 24 December 1994
  4074.  
  4075.    *  Slightly revised documentation.
  4076.  
  4077.    *  CPU:  Corrected display of Pentium processor stepping level,
  4078.       model and family.  Also see the new P5 command.
  4079.  
  4080.    *  Added the P5 command based on several requests.
  4081.                   Appendix D:  Background Discussion
  4082.  
  4083.  
  4084. CFG started as a pure DOS device driver.  As such, versions 1.0 and
  4085. 1.1 provided functionality from CONFIG.SYS only.  I experimented with
  4086. dual-mode programming to make version 2.0 provide a command line
  4087. interface from DOS, expanding the program's scope significantly. 
  4088. Subsequent versions have expanded on both the CONFIG.SYS and command
  4089. line utility commands available.
  4090.  
  4091. Version 2.1 almost made it into Bantam's "DOS 6.0 Power Tools" except
  4092. for the delays in the mail brought about by my 1993 deployment (2.0
  4093. was shipped).  Several people received it directly based on specific
  4094. requests.  Version 2.2 was another significant expansion and
  4095. improvement.
  4096.  
  4097. Version 2.3 moved CFG into still another facet of executable programs
  4098. in that it became a multi-segmented EXE program.  The transition took
  4099. a bit work (with some errors despite all my testing, sorry), but was
  4100. necessary since I had to allow for up to 32KB of DOS environment,
  4101. adequate stack space, program code and all data within 64KB.  While
  4102. version 2.2 fits, it was obvious there was no more room for expansion. 
  4103. Version 2.3 has lots of elbow room for continued expansion and
  4104. improvement.  Modular programming helps the space cram.  The COM
  4105. extension was retained for compatibility with CONFIG.SYS and batch
  4106. files already written.  DOS identifies the program as an EXE and loads
  4107. it appropriately.  (The 2.3x versions fix known bugs.)
  4108.  
  4109. Version 2.4 splits the program's Help files out to reduce the size of
  4110. the executable.  This allows faster execution from CONFIG.SYS when DOS
  4111. has only one disk buffer available.  Searchable access to CFG.DOC is
  4112. also provided.  Both changes were something I was planning for awhile. 
  4113. CFG has also become shareware with this version.  Version 2.4 was
  4114. published in Tab Books "The Ultimate Batch File Book" by Ronny
  4115. Richardson.
  4116.  
  4117. Numerous utilities exist for use from the command line, but few were
  4118. available for use in CONFIG.SYS.  I could find only a few specially
  4119. written drivers for pausing CONFIG.SYS.  When I added Qualitas'
  4120. BlueMax 6.0 to my system, what was once a relatively short boot
  4121. process became quite a protracted affair.  I wanted to organize
  4122. things, add color to the device driver installation phase, messages
  4123. (if necessary) and optional pauses.  I foresaw my disk becoming
  4124. overrun by numerous small device drivers (more than it already was),
  4125. so I wrote the basic CFG shell handler and then started looking around
  4126. for useful utilities.  Most of what is included was written by myself. 
  4127. Other routines were adapted from published sources, many of those were
  4128. enhanced.
  4129.  
  4130. When CFG is executed from CONFIG.SYS as a device driver, it does not
  4131. remain resident in memory and may be run multiple times.  CFG sets up
  4132. its own stack during execution to avoid overflowing the DOS stack. 
  4133. The program then moves the command line from the system buffer to a
  4134. local buffer for parsing.  Switches are parsed, the CommandName is
  4135. scanned and a SubCommandName checked, if appropriate, and the
  4136. appropriate command is executed.  The command is responsible for any
  4137. additional command line parsing.  Upon completion of the command, the
  4138. CFG command handler regains control and performs the final clean-up
  4139. processing required by DOS for termination.
  4140.  
  4141. Since I wanted to access many CFG routines from the DOS command line
  4142. or from a batch file, I rewrote CFG (as of version 2.0) to be dual
  4143. mode program: both device driver and command line utility.  Not all
  4144. commands, however, are available in each mode.  An error message will
  4145. be displayed if a command is requested when it cannot be run. For those who are interested, CFG will run the same command subroutine
  4146. code from both CONFIG.SYS and a batch file, only the program entry
  4147. point changes.  Not many DOS functions are [officially] available
  4148. during device driver installation, since the program file fragments
  4149. that will become the operating system are still being assembled when
  4150. the drivers' initialization routines are run.  DOS (Interrupt 21H)
  4151. functions that are [officially] available are:  01H-0CH (various
  4152. character and string input and output routines), 25H (Set Interrupt
  4153. Vector), 30H (Get MS-DOS Version Number), and 35H (Get Interrupt
  4154. Vector).  All BIOS video and keyboard routines are available.  Within
  4155. these limits, some very useful things can be done.  If you bend these
  4156. limits, even more interesting things are possible.
  4157.  
  4158. General parsing routines allow any of the standard DOS separator
  4159. characters to be ignored.  With the exception of the bright Cls colors
  4160. noted in the command description and a few other clearly identified
  4161. cases, the number of spaces between command line words does not
  4162. matter.
  4163.                       Appendix E:  Error Messages
  4164.  
  4165.  
  4166. ANSI not installed.
  4167. ───   Issued if CFG determines that the ANSI driver has not been
  4168.       loaded into memory when required for a command.
  4169.  
  4170. Buffer shifted.
  4171. ───   Issued if the DOS keyboard buffer has been moved from its
  4172.       default location when KeyBuffer attempts to change its size.
  4173.  
  4174. Cannot display Help in graphics mode.
  4175. ───   Issued if the video system is displaying graphics when Help is
  4176.       requested.
  4177.  
  4178. Cannot find file: Filename.
  4179. ───   Issued if the requested file cannot be located by the DOS file
  4180.       system.
  4181.  
  4182. Cannot locate hidden ports.
  4183. ───   Issued if the signature is missing from the upper memory hidden
  4184.       storage location.  This could be due to the area having been
  4185.       over-written or due to a Restore being run without a preliminary
  4186.       Hide operation.
  4187.  
  4188. Cannot swap the same port.
  4189. ───   Issued if the ports requested are the same.
  4190.  
  4191. Command not available.
  4192. ───   Issued if the command is not available in the current program
  4193.       mode.  Check the CFG.DOC file to see which commands are
  4194.       available from CONFIG.SYS and which are available from batch
  4195.       files.
  4196.  
  4197. DOS error.
  4198. ───   Issued if DOS returns an error when attempting to perform a
  4199.       requested function.  ErrorLevel is usually the DOS error number.
  4200.  
  4201. Environment error.
  4202. ───   Issued if CFG's environment scanning routine encounters an error
  4203.       in processing the environment (scan past end).  The DOS
  4204.       environment is not changed if this error occurs.
  4205.  
  4206. File error.
  4207. ───   Issued if DOS returns an error when attempting to perform file
  4208.       operations.  The ErrorLevel is usually the DOS error number.
  4209.  
  4210. File exists.
  4211. ───   Issued if ZeroFile finds that the requested file already exists
  4212.       without the /T option specified.
  4213.  
  4214. Hidden ports already present.
  4215. ───   Issued if Hide is run twice in succession without a Restore in
  4216.       between.  A second Hide action is prevented since it would
  4217.       permanently erase the base port addresses.
  4218.  
  4219. IACA already in use.
  4220. ───   Issued if the first character of the IACA is not an ASCII 0,
  4221.       indicating other information may have been placed in the IACA.
  4222.  
  4223. IACA is empty.
  4224. ───   Issued if the first character of the IACA is an ASCII 0,
  4225.       indicating that nothing has been written to the IACA.
  4226. Invalid checksum, ports not restored.
  4227. ───   The checksum stored with the hidden ports shows that the data
  4228.       has been changed since it was written, probably due to being
  4229.       over-written.
  4230.  
  4231. Invalid color.
  4232. ───   Issued if anything appears after the CommandName that cannot be
  4233.       parsed as a screen color when one is required.
  4234.  
  4235. Invalid CommandName.
  4236. ───   Issued if specified CommandName is incorrect or missing.
  4237.  
  4238. Invalid DOS version.
  4239. ───   Issued if the command requires a specific minimum DOS version
  4240.       that does not match the version currently running.
  4241.  
  4242. Invalid drive designation.
  4243. ───   Issued if a valid drive character is not specified on the
  4244.       command line.
  4245.  
  4246. Invalid format.
  4247. ───   Issued if the command line format does not match that required
  4248.       by the command.
  4249.  
  4250. Invalid number.
  4251. ───   Issued if the command line input is not in the correct decimal
  4252.       or hexadecimal format.
  4253.  
  4254. Invalid SubCommandName.
  4255. ───   Issued if a SubCommandName is not correct.  CFG checks for a
  4256.       match between the first word after the CommandName and values in
  4257.       an internal table of valid SubCommandNames for Commands that
  4258.       have SubCommands.  If a match is not found, this error is issued
  4259.       and no program output is made.
  4260.  
  4261. Invalid video mode.
  4262. ───   Issued if the you try to switch video font size while in
  4263.       graphics mode.
  4264.  
  4265. Missing or incorrect command option.
  4266. ───   Issued if the requested Command does not have a required option
  4267.       specified.
  4268.  
  4269. Missing or invalid port.
  4270. ───   Issued if only one port is given on the command line or if the
  4271.       port requested is other than 1/2/3/4 for ComSwap or 1/2/3 for
  4272.       LptSwap.
  4273.  
  4274. Out of environment space.
  4275. ───   Issued if the desired output will cause the environment to
  4276.       exceed its maximum size.  The output is not made and the
  4277.       environment is not corrupted.  Delete unneeded environment
  4278.       strings or reboot with a larger /E: option specified in
  4279.       CONFIG.SYS on the SHELL line.
  4280.  
  4281. Unable to find DOS Environment.
  4282. ───   Issued if CFG's internal search routine cannot find the DOS
  4283.       master environment based on it validation criteria.
  4284.  
  4285. Unknown SFT format.
  4286. ───   Issued if the Files command finds an unexpected System File
  4287.       Table format when performing its verifications.
  4288. Wrong color format or spelling.
  4289. ───   Issued if an illegal color is encountered while parsing.  See
  4290.       the Cls command for the exact spelling.
  4291.                   Appendix F:  Sample CONFIG.SYS File
  4292.  
  4293.  
  4294. The following is a past copy of one my CONFIG.SYS files showing usage
  4295. of several of the commands as well as the MultiCommand format.  Line
  4296. wrap is indicated by indentation.  This file is from an IBM PS/2 Model
  4297. 80 with Stacker Version 2.1.
  4298.  
  4299. Break=On
  4300. Buffers=10
  4301. Dos=High
  4302. FCBS=1
  4303. Files=8
  4304. LastDrive=G
  4305. Stacks=8,128
  4306. Shell=C:\Dos\Command.Com C:\Dos\ /E:800 /P /F
  4307. Device=C:\Dos\Start\Cfg.Com VGA50;Cls Bright White on Blue
  4308. Device=C:\BlueMax\BlueMax.Sys Pro=C:\BlueMax\BlueMax.Pro
  4309. Device=C:\Dos\Start\Cfg.Com Cursor Hide; KeyPause
  4310. Device=C:\BlueMax\386Load.Sys Terse Size=1184 PrgReg=4 FlexFrame
  4311.       Prog=C:\Dos\Start\DASDDrvr.Sys
  4312. Device=C:\Norton\Ncache.Exe /Install /Ini=C:\Norton
  4313. Device=C:\Dos\Start\Cfg.Com KeyPause
  4314. Device=C:\BlueMax\386Load.Sys Terse Size=37056 PrgReg=3 FlexFrame
  4315.       Prog=C:\Dos\Start\Mouse.Sys Ser 2 S06 NB
  4316. Device=C:\Dos\Start\Cfg.Com KeyPause
  4317. Device=C:\BlueMax\386Load.Sys Terse Size=5280 FlexFrame
  4318.       Prog=C:\Dos\Start\Bridge_B.Drv /PS60:1B
  4319. Device=C:\Dos\Start\Cfg.Com LptHide Hide; KeyPause
  4320. Device=C:\BlueMax\386Load.Sys Terse Size=30880 PrgReg=3 FlexFrame
  4321.       Prog=C:\Dos\Start\RCD.Sys /M0
  4322. Device=C:\Dos\Start\Cfg.Com LptHide Restore; KeyPause;Cls Bright White
  4323.       on Blue
  4324. Device=C:\BlueMax\386Load.Sys Terse Size=6768 PrgReg=2 FlexFrame
  4325.       Prog=C:\BlueMax\386Disk.Sys 1024 512 64 /XMS
  4326. Device=C:\Dos\Start\Cfg.Com KeyPause
  4327. Device=C:\BlueMax\386Load.Sys Terse Size=9040 PrgReg=2 FlexFrame
  4328.       Prog=C:\Dos\Start\ANSI.Sys
  4329. Device=C:\Dos\Start\Cfg.Com Color Bright White on Blue;KeyPause
  4330. Device=C:\Stacker\Screate.Sys F:
  4331. Device=C:\Dos\Start\Cfg.Com KeyPause
  4332. Device=C:\BlueMax\386Load.Sys Terse Size=40907 PrgReg=3 FlexFrame
  4333.       Prog=C:\Stacker\Stacker.Com D:\StacVol.Dsk @ F: /EMS /NB
  4334. Device=C:\Dos\Start\Cfg.Com KeyPause
  4335. Device=C:\Stacker\Sswap.Com D:\StacVol.Dsk
  4336. Device=C:\Dos\Start\Cfg.Com KeyPause
  4337. Device=C:\BlueMax\386Load.Sys Terse Size=62573 PrgReg=3 FlexFrame
  4338.       Prog=C:\NAV\NAV_.Sys /W
  4339. Device=C:\Dos\Start\Cfg.Com KeyPause; VGA25 /C; Cursor 2 2
  4340.                                  Index
  4341.  
  4342.  
  4343. Add  14                             DriveExist  28
  4344. AM  24                              DriveID  29
  4345. And  14                             DriveReady  30
  4346. ANSI  15, 18, 19                    DriveSize  30
  4347. ASCII  15                           DriveSpace  30
  4348. Association of Shareware            DriveVolume  31
  4349.   Professionals  6                  DS4  31
  4350. Beep  15                            Echo  31
  4351. Bibliography  64                    EchoPause  32
  4352. Blink  16                           EGA25  32
  4353. Boot  16                            EGA43  32
  4354.    NoError  16                      Env  32
  4355. Border  16                             Caps  33
  4356. Break  16                              Clear  33
  4357. CanCopy  17                            Fill  33
  4358. Cecho  17                              Free  33
  4359. Cls  17                                Reset  33
  4360. CodePage  18                           Save  33
  4361. ColdBoot  19                           Set  33
  4362.    Verify  19                          Strings  33
  4363.    WaitFor  19                         Total  33
  4364.    WaitTo  19                          Used  34
  4365. Color  19                           Environment
  4366. Colors  18                             General Description  11
  4367. Cols  19                               Switch  9
  4368. ComBaud  20                         Error Messages  73
  4369. ComHide  20                         ErrorLevel  34
  4370.    Hide  20                         FileDir  34
  4371.    Restore  20                      FileDrive  34
  4372. Command Line                        FileDTC  34
  4373. Case  11                            FileExist  35
  4374.    From CONFIG.SYS  11              FileExt  34
  4375.    Switches  8                      FileLines  35
  4376.    Syntax  8                        FileName  34
  4377. Compare  21                         Files  36
  4378. ComSet  21                             Blocks  36
  4379. ComSwap  21                            Free  36
  4380. Convert  22                            Margin  36
  4381. CoProc  22                             Orphan  36
  4382. Country  22                            Previous  36
  4383. CPU  23                                Total  36
  4384. Cursor  23, 76                         Used  36
  4385.    Default  23                      FileSize  36
  4386.    Hide  23, 76                     FileText  37
  4387.    Restore  23                      FullYear  24
  4388. Day  24                             GamePort  37
  4389. DESQview  25                        GetKey  37
  4390. Device  25                          Global Switches  8
  4391.    Exist  25                        Help  38
  4392.    List  25                         Hour  24
  4393.    Rename  25                       IACAfill  39
  4394. Dir  26                             IACAread  39
  4395. DirExist  26                        Input  40
  4396. Display  26                         Installation  7
  4397. Div  14                             Intense  40
  4398. DosKey  27                          KeyBoard  40
  4399. DOSlocation  27                     KeyBuffer  41
  4400. DOSmajor  28                           Set  41
  4401. DOSminor  28                           Status  41
  4402. DOSstartup  28                      KeyFlush  41
  4403. DOSversion  28                      KeyPause  41, 76
  4404. Drive  28                           KeyPress  42
  4405. KeyStuff  42                       ROMmodel  54
  4406. LastBoot  42                        RootDir  54
  4407. LastDrive  42                       Rows  54
  4408. Left  43                            Second  24
  4409. Length  43                          Share  54
  4410. Locate  43                          Shareware  5
  4411. Lock  43                            Shift-AND  55
  4412.    Disk  44                         Shift-OR  55
  4413.    Net  44                          ShiftLock  55
  4414.    None  44                            Caps  55
  4415.    Stack  44                           Insert  55
  4416.    System  44                          Num  55
  4417. Lower  44                              Scroll  55
  4418. LptHide  44                         ShiftState  56
  4419.    Hide  44, 76                     Stacker  56
  4420.    Restore  44, 76                  Sub  14
  4421. LptSet  45                          SWREG  6
  4422. LptSwap  45                         TaskSwitch  57
  4423. MachineName  45                     Toggle  57
  4424. Memory  46                          Tones  57
  4425.    Base  46                         Typematic  58
  4426.    Expanded  46                     Upper  58
  4427.    Extended  46                     Verify  58
  4428.    High  46                         Version  59
  4429.    Main  46                            CFG  59
  4430.    UMB  46                             DOS  59
  4431. Mid  47                                DPMI  59
  4432. Minute  24                             EMS  59
  4433. Mod  14                                VCPI  59
  4434. Mono  47                               XMS  59
  4435. Month  24                           VGA25  59, 76
  4436. Mouse  47                           VGA43  59
  4437. Mul  14                             VGA50  60
  4438. MultiCommand  9                     VideoMode  60
  4439. Not  14                             WaitFor  60
  4440. Now  47                             WaitTo  61
  4441. Or  14                              WarmBoot  61
  4442. P5  48                                 Verify  61
  4443.    Model  48                           WaitFor  61
  4444.    Step  48                            WaitTo  61
  4445. Page  49                            WeekDay  24
  4446. Pause  49                           Window  61
  4447. PM  24                              Windows  62
  4448. Print  49                           Xor  14
  4449. PrintEcho  49                       Year  24
  4450.    Off  50                          ZeroFile  62
  4451.    On  50
  4452.    Status  50
  4453.    Toggle  50
  4454. Printer  50
  4455. Protected  50
  4456. PrtScr  51
  4457.    Off  51
  4458.    On  51
  4459. Print  51
  4460.    Status  51
  4461.    Toggle  51
  4462. RamDrive  51
  4463. RandomFile  52
  4464. Registration  5, 6
  4465. Rem  53
  4466. RenDir  53
  4467. Revision History  65
  4468. Right  53
  4469. ROMdate  53
  4470.